aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/fd_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fd_util.c b/src/fd_util.c
index 769823bc4..1f3004d0c 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -270,8 +270,8 @@ recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags)
struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg);
while (cmsg != NULL) {
if (cmsg->cmsg_type == SCM_RIGHTS) {
- int fd = *(const int *)CMSG_DATA(cmsg);
- fd_set_cloexec(fd, true);
+ const int *fd_p = (const int *)CMSG_DATA(cmsg);
+ fd_set_cloexec(*fd_p, true);
}
cmsg = CMSG_NXTHDR(msg, cmsg);