From: Chuck Lever Date: Fri, 26 Sep 2008 20:11:57 +0000 (-0400) Subject: nfs-utils: Remove excess log reporting X-Git-Tag: nfs-utils-1-1-4~15 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ec2e72c3e6f13dfa049598427c56115f1cbed16c;p=nfs-utils.git nfs-utils: Remove excess log reporting Clean up: The makesock() function already reports an error if it can't create a socket. Remove the redundant error check and logging done in rpc_init() after a makesock() call. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index bb68203..eb5629a 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -89,10 +89,8 @@ rpc_init(char *name, int prog, int vers, } if (defport == 0) sock = RPC_ANYSOCK; - else if ((sock = makesock(defport, IPPROTO_UDP)) < 0) { - xlog(L_FATAL, "%s: cannot make a UDP socket\n", - name); - } + else + sock = makesock(defport, IPPROTO_UDP); } if (sock == RPC_ANYSOCK) sock = svcudp_socket (prog, 1); @@ -119,10 +117,8 @@ rpc_init(char *name, int prog, int vers, } if (defport == 0) sock = RPC_ANYSOCK; - else if ((sock = makesock(defport, IPPROTO_TCP)) < 0) { - xlog(L_FATAL, "%s: cannot make a TCP socket\n", - name); - } + else + sock = makesock(defport, IPPROTO_TCP); } if (sock == RPC_ANYSOCK) sock = svctcp_socket (prog, 1);