nfs-utils: Remove excess log reporting
authorChuck Lever <chuck.lever@oracle.com>
Fri, 26 Sep 2008 20:11:57 +0000 (16:11 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 26 Sep 2008 20:11:57 +0000 (16:11 -0400)
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
support/nfs/rpcmisc.c

index bb68203..eb5629a 100644 (file)
@@ -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);