[PATCH 15/19] nfs-utils: Remove excess log reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 support/nfs/rpcmisc.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c
index 9d76e5d..506b595 100644
--- a/support/nfs/rpcmisc.c
+++ b/support/nfs/rpcmisc.c
@@ -151,10 +151,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);
@@ -181,10 +179,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);

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux