Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/rpc CID 97511{4, 5}: Ignore bindresvport return. It ...



details:   https://anonhg.NetBSD.org/src/rev/68d4d196e02a
branches:  trunk
changeset: 329544:68d4d196e02a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 28 14:45:57 2014 +0000

description:
CID 97511{4,5}: Ignore bindresvport return. It only works for root.

diffstat:

 lib/libc/rpc/rpc_soc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 8e1db90dce42 -r 68d4d196e02a lib/libc/rpc/rpc_soc.c
--- a/lib/libc/rpc/rpc_soc.c    Wed May 28 14:45:19 2014 +0000
+++ b/lib/libc/rpc/rpc_soc.c    Wed May 28 14:45:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_soc.c,v 1.18 2013/03/11 20:19:29 tron Exp $        */
+/*     $NetBSD: rpc_soc.c,v 1.19 2014/05/28 14:45:57 christos Exp $    */
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -45,7 +45,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_soc.c 1.41 89/05/02 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: rpc_soc.c,v 1.18 2013/03/11 20:19:29 tron Exp $");
+__RCSID("$NetBSD: rpc_soc.c,v 1.19 2014/05/28 14:45:57 christos Exp $");
 #endif
 #endif
 
@@ -156,7 +156,7 @@
        bindaddr.maxlen = bindaddr.len =  sizeof (struct sockaddr_in);
        bindaddr.buf = raddr;
 
-       bindresvport(fd, NULL);
+       (void)bindresvport(fd, NULL);
        cl = clnt_tli_create(fd, nconf, &bindaddr, prog, vers,
                                sendsz, recvsz);
        if (cl) {
@@ -254,7 +254,7 @@
 
        memset(&sccsin, 0, sizeof sccsin);
        sccsin.sin_family = AF_INET;
-       bindresvport(fd, &sccsin);
+       (void)bindresvport(fd, &sccsin);
        listen(fd, SOMAXCONN);
        svc = svc_tli_create(fd, nconf, NULL, sendsize, recvsize);
        (void) freenetconfigent(nconf);



Home | Main Index | Thread Index | Old Index