diff options
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/connections.c | 4 | ||||
-rw-r--r-- | nscd/nscd_helper.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 234e289f00..ca73393f40 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -1023,7 +1023,8 @@ send_ro_fd (struct database_dyn *db, char *key, int fd) cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN (sizeof (int)); - *(int *) CMSG_DATA (cmsg) = db->ro_fd; + int *ip = (int *) CMSG_DATA (cmsg); + *ip = db->ro_fd; msg.msg_controllen = cmsg->cmsg_len; @@ -1719,6 +1720,7 @@ handle_request: request received (Version = %d)"), req.version); /* One more thread available. */ ++nready; } + /* NOTREACHED */ } diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 7db5d09845..cd3fa24196 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1998-2007, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -318,7 +318,7 @@ get_mapping (request_type type, const char *key, /* This access is well-aligned since BUF is correctly aligned for an int and CMSG_DATA preserves this alignment. */ - *(int *) CMSG_DATA (cmsg) = -1; + memset (CMSG_DATA (cmsg), '\xff', sizeof (int)); msg.msg_controllen = cmsg->cmsg_len; @@ -335,7 +335,8 @@ get_mapping (request_type type, const char *key, != CMSG_LEN (sizeof (int))), 0)) goto out_close2; - mapfd = *(int *) CMSG_DATA (cmsg); + int *ip = (void *) CMSG_DATA (cmsg); + mapfd = *ip; if (__builtin_expect (n != keylen && n != keylen + sizeof (mapsize), 0)) goto out_close; |