From: Steve Dickson Date: Mon, 19 Jul 2010 16:28:09 +0000 (-0400) Subject: Remove warnings from svc_socket.c X-Git-Tag: nfs-utils-1-2-3-rc5~21 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0cdfd35cecc17eb1927f15d33205e43ec66675f2;p=nfs-utils.git Remove warnings from svc_socket.c svc_socket.c: In function 'svcudp_socket': svc_socket.c:160: warning: unused parameter 'reuse' Signed-off-by: Steve Dickson --- diff --git a/support/include/nfslib.h b/support/include/nfslib.h index e44cf8f..b8e7c40 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -158,6 +158,6 @@ void qword_printuint(FILE *f, unsigned int num); void closeall(int min); int svctcp_socket (u_long __number, int __reuse); -int svcudp_socket (u_long __number, int __reuse); +int svcudp_socket (u_long __number); #endif /* NFSLIB_H */ diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index a0854e7..b73187a 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -154,7 +154,7 @@ rpc_init(char *name, int prog, int vers, sock = makesock(defport, IPPROTO_UDP); } if (sock == RPC_ANYSOCK) - sock = svcudp_socket (prog, 1); + sock = svcudp_socket (prog); transp = svcudp_create(sock); if (transp == NULL) { xlog(L_FATAL, "cannot create udp service."); diff --git a/support/nfs/svc_socket.c b/support/nfs/svc_socket.c index f44217a..03a5325 100644 --- a/support/nfs/svc_socket.c +++ b/support/nfs/svc_socket.c @@ -157,9 +157,9 @@ svctcp_socket (u_long number, int reuse) * Create and bind a UDP socket based on program number */ int -svcudp_socket (u_long number, int reuse) +svcudp_socket (u_long number) { - return svc_socket (number, SOCK_DGRAM, IPPROTO_UDP, 0); + return svc_socket (number, SOCK_DGRAM, IPPROTO_UDP, FALSE); } #ifdef TEST @@ -174,7 +174,7 @@ check (u_long number, u_short port, int protocol, int reuse) if (protocol == IPPROTO_TCP) socket = svctcp_socket (number, reuse); else - socket = svcudp_socket (number, reuse); + socket = svcudp_socket (number); if (socket < 0) return 1;