mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
* sunrpc/svc_unix.c (__msgread): Move ON local var inside block within #ifdef SO_PASSCRED. Avoids unused var when no SO_PASSCRED. * sunrpc/clnt_unix.c (__msgread): Likewise.
This commit is contained in:
parent
e1350332dc
commit
d76240d7e5
@ -445,7 +445,6 @@ __msgread (int sock, void *buf, size_t cnt)
|
||||
struct iovec iov[1];
|
||||
struct msghdr msg;
|
||||
struct cmessage cm;
|
||||
int on = 1;
|
||||
|
||||
iov[0].iov_base = buf;
|
||||
iov[0].iov_len = cnt;
|
||||
@ -459,8 +458,11 @@ __msgread (int sock, void *buf, size_t cnt)
|
||||
msg.msg_flags = 0;
|
||||
|
||||
#ifdef SO_PASSCRED
|
||||
{
|
||||
int on = 1;
|
||||
if (setsockopt (sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on)))
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return recvmsg (sock, &msg, 0);
|
||||
|
@ -295,7 +295,6 @@ __msgread (int sock, void *buf, size_t cnt)
|
||||
{
|
||||
struct iovec iov[1];
|
||||
struct msghdr msg;
|
||||
int on = 1;
|
||||
|
||||
iov[0].iov_base = buf;
|
||||
iov[0].iov_len = cnt;
|
||||
@ -309,8 +308,11 @@ __msgread (int sock, void *buf, size_t cnt)
|
||||
msg.msg_flags = 0;
|
||||
|
||||
#ifdef SO_PASSCRED
|
||||
{
|
||||
int on = 1;
|
||||
if (setsockopt (sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on)))
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return recvmsg (sock, &msg, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user