aboutsummaryrefslogtreecommitdiffstats
path: root/src/fd_util.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-09-23 08:56:54 +0200
committerMax Kellermann <max@duempel.org>2010-09-23 09:01:20 +0200
commit4425989898dec5454027f0d04b838470480daebd (patch)
tree430c3dd6e2d0bd2b4fc73d78bc4ff1bf30b3964f /src/fd_util.c
parent5b996ab88097b82352fb84aab33f453737818a51 (diff)
downloadmpd-4425989898dec5454027f0d04b838470480daebd.tar.gz
mpd-4425989898dec5454027f0d04b838470480daebd.tar.xz
mpd-4425989898dec5454027f0d04b838470480daebd.zip
fd_util: work around aliasing warning in recvmsg_cloexec()
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);