From 5615eaf26469f20c2d8c3be5770e12564a1edfff Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 10 Jun 2011 12:45:09 -0700 Subject: Quash some new warnings from GCC 4.6. --- sunrpc/clnt_udp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sunrpc') diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 7aa86a64c3..83fdd8ef2a 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -172,8 +172,6 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, cu->cu_xdrpos = XDR_GETPOS (&(cu->cu_outxdrs)); if (*sockp < 0) { - int dontblock = 1; - #ifdef SOCK_NONBLOCK # ifndef __ASSUME_SOCK_CLOEXEC if (__have_sock_cloexec >= 0) @@ -212,8 +210,11 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, # ifdef SOCK_CLOEXEC if (__have_sock_cloexec < 0) # endif - /* the sockets rpc controls are non-blocking */ - (void) __ioctl (*sockp, FIONBIO, (char *) &dontblock); + { + /* the sockets rpc controls are non-blocking */ + int dontblock = 1; + (void) __ioctl (*sockp, FIONBIO, (char *) &dontblock); + } #endif #ifdef IP_RECVERR { -- cgit 1.4.1