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

Commit ecd6ad0d authored by Yi Kong's avatar Yi Kong
Browse files

Fix incorrect use of TEMP_FAILURE_RETRY

The return code check should be after TEMP_FAILURE_RETRY.

Discovered by the tautological-constant-compare warning.

Test: presubmit
Bug: 72331526
Change-Id: I531a9e0498ce9448facc692ddedc14434e7ab507
parent ab2d6cdc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ bool SnapuserdServer::WaitForSocket() {

    // We don't care if the ACK is received.
    code[0] = 'a';
    if (TEMP_FAILURE_RETRY(send(fd, code, sizeof(code), MSG_NOSIGNAL) < 0)) {
    if (TEMP_FAILURE_RETRY(send(fd, code, sizeof(code), MSG_NOSIGNAL)) < 0) {
        PLOG(ERROR) << "Failed to send ACK to proxy";
        return false;
    }
+1 −1
Original line number Diff line number Diff line
@@ -637,7 +637,7 @@ bool UserSnapshotServer::WaitForSocket() {

    // We don't care if the ACK is received.
    code[0] = 'a';
    if (TEMP_FAILURE_RETRY(send(fd, code, sizeof(code), MSG_NOSIGNAL) < 0)) {
    if (TEMP_FAILURE_RETRY(send(fd, code, sizeof(code), MSG_NOSIGNAL)) < 0) {
        PLOG(ERROR) << "Failed to send ACK to proxy";
        return false;
    }