Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet "error" in in_pcbbind() was only ever set but no...



details:   https://anonhg.NetBSD.org/src/rev/eddd88841c13
branches:  trunk
changeset: 538514:eddd88841c13
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Oct 22 02:31:16 2002 +0000

description:
"error" in in_pcbbind() was only ever set but not used, remove it.

diffstat:

 sys/netinet/in_pcb.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r f3e0d60de1f7 -r eddd88841c13 sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c      Tue Oct 22 02:28:47 2002 +0000
+++ b/sys/netinet/in_pcb.c      Tue Oct 22 02:31:16 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_pcb.c,v 1.79 2002/06/11 19:39:59 itojun Exp $       */
+/*     $NetBSD: in_pcb.c,v 1.80 2002/10/22 02:31:16 simonb Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.79 2002/06/11 19:39:59 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.80 2002/10/22 02:31:16 simonb Exp $");
 
 #include "opt_ipsec.h"
 
@@ -223,9 +223,6 @@
        struct sockaddr_in *sin;
        u_int16_t lport = 0;
        int wild = 0, reuseport = (so->so_options & SO_REUSEPORT);
-#ifndef IPNOPRIVPORTS
-       int error;
-#endif
 
        if (TAILQ_FIRST(&in_ifaddr) == 0)
                return (EADDRNOTAVAIL);
@@ -267,7 +264,7 @@
 #ifndef IPNOPRIVPORTS
                /* GROSS */
                if (ntohs(lport) < IPPORT_RESERVED &&
-                   (p == 0 || (error = suser(p->p_ucred, &p->p_acflag))))
+                   (p == 0 || suser(p->p_ucred, &p->p_acflag)))
                        return (EACCES);
 #endif
                if (so->so_uid && !IN_MULTICAST(sin->sin_addr.s_addr)) {
@@ -299,7 +296,7 @@
 
                if (inp->inp_flags & INP_LOWPORT) {
 #ifndef IPNOPRIVPORTS
-                       if (p == 0 || (error = suser(p->p_ucred, &p->p_acflag)))
+                       if (p == 0 || suser(p->p_ucred, &p->p_acflag))
                                return (EACCES);
 #endif
                        min = lowportmin;



Home | Main Index | Thread Index | Old Index