Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33f8c194 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "liblog: use SOCK_NONBLOCK directly."

am: fca43d3e

Change-Id: I4d959d9091adbf8bf2d7b68653a3c6064893a65a
parents e4d79532 fca43d3e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -67,12 +67,9 @@ static int logdOpen()
    int i, ret = 0;

    if (logdLoggerWrite.context.sock < 0) {
        i = TEMP_FAILURE_RETRY(socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0));
        i = TEMP_FAILURE_RETRY(socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0));
        if (i < 0) {
            ret = -errno;
        } else if (TEMP_FAILURE_RETRY(fcntl(i, F_SETFL, O_NONBLOCK)) < 0) {
            ret = -errno;
            close(i);
        } else {
            struct sockaddr_un un;
            memset(&un, 0, sizeof(struct sockaddr_un));