Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/rpcbind Do not check unitialized variables as error...



details:   https://anonhg.NetBSD.org/src/rev/c6857893b1fc
branches:  trunk
changeset: 495685:c6857893b1fc
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Thu Aug 03 00:07:22 2000 +0000

description:
Do not check unitialized variables as error values. This is generally
frowned upon, or so I hear.

diffstat:

 usr.sbin/rpcbind/rpcb_svc_com.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r c3fc3f16eef4 -r c6857893b1fc usr.sbin/rpcbind/rpcb_svc_com.c
--- a/usr.sbin/rpcbind/rpcb_svc_com.c   Thu Aug 03 00:04:30 2000 +0000
+++ b/usr.sbin/rpcbind/rpcb_svc_com.c   Thu Aug 03 00:07:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpcb_svc_com.c,v 1.5 2000/06/22 13:55:18 fvdl Exp $    */
+/*     $NetBSD: rpcb_svc_com.c,v 1.6 2000/08/03 00:07:22 fvdl Exp $    */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -1199,7 +1199,7 @@
        struct rpc_err  reply_error;
        char            *buffer;
        struct finfo    *fi;
-       int             inlen, pos, len, res;
+       int             inlen, pos, len;
        struct r_rmtcall_args a;
        struct sockaddr_storage ss;
        socklen_t fromlen;
@@ -1215,10 +1215,10 @@
                inlen = recvfrom(fd, buffer, RPC_BUF_MAX, 0,
                            (struct sockaddr *)&ss, &fromlen);
        } while (inlen < 0 && errno == EINTR);
-       if (res < 0) {
+       if (inlen < 0) {
                if (debugging)
                        fprintf(stderr,
-       "handle_reply:  recvfrom returned %d, errno %d\n", res, errno);
+       "handle_reply:  recvfrom returned %d, errno %d\n", inlen, errno);
                goto done;
        }
 



Home | Main Index | Thread Index | Old Index