ctdb-system: Fix typo in ctdb_get_peer_pid
authorAmitay Isaacs <amitay@gmail.com>
Thu, 21 Apr 2016 01:31:13 +0000 (11:31 +1000)
committerMartin Schwenke <martins@samba.org>
Sat, 23 Apr 2016 21:55:14 +0000 (23:55 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/system_aix.c
ctdb/common/system_linux.c

index 9b22ff9edc12e7b2208f29b48dbfe6631238fb8c..de69b9ee687ee074f20a123ff794e3b74e474544 100644 (file)
@@ -386,7 +386,7 @@ int ctdb_get_peer_pid(const int fd, pid_t *peer_pid)
        struct peercred_struct cr;
        socklen_t crl = sizeof(struct peercred_struct);
        int ret;
-       if ((ret = getsockopt(fd, SOL_SOCKET, SO_PEERID, &cr, &crl) == 0)) {
+       if ((ret = getsockopt(fd, SOL_SOCKET, SO_PEERID, &cr, &crl)) == 0) {
                *peer_pid = cr.pid;
        }
        return ret;
index b754e91a92035bfc32fab5db7530df6d976b5a40..f8c793299b60e5f0b7b60946de7808f203806108 100644 (file)
@@ -617,7 +617,7 @@ int ctdb_get_peer_pid(const int fd, pid_t *peer_pid)
        struct ucred cr;
        socklen_t crl = sizeof(struct ucred);
        int ret;
-       if ((ret = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &crl) == 0)) {
+       if ((ret = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &crl)) == 0) {
                *peer_pid = cr.pid;
        }
        return ret;