X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.c;h=c2b76f37a0401886cc8b5b8fe8ffd3263b3f83e8;hb=9e89c9310ef10784981c363bce03339030c2ed99;hp=20baaaf7b0dfafa2cd660d492eb0162367625dbe;hpb=d27c42b8fcc92f3fc776fd1b821d2572bce01c04;p=lttng-tools.git diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c index 20baaaf7b..c2b76f37a 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -541,10 +541,13 @@ ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, memcpy(creds, CMSG_DATA(cmptr), sizeof_cred); #elif defined(__FreeBSD__) - ret = getpeereid(sock, &creds->uid, &creds->gid); - if (ret != 0) { - return ret; - } + { + int peer_ret; + + peer_ret = getpeereid(sock, &creds->uid, &creds->gid); + if (peer_ret != 0) { + return peer_ret; + } #else #error "Please implement credential support for your OS." #endif /* __linux__ */