diff options
author | bde <bde@FreeBSD.org> | 2004-04-06 10:59:11 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2004-04-06 10:59:11 +0000 |
commit | 014c3b4511a0b855a5f01e9ff71c89ca1364bd95 (patch) | |
tree | ac6c356d4d6cf7c4017156b3cf0735ddda2e4c6d | |
parent | 122259ad35823a504b3b5d92d602fe30bcae120b (diff) | |
download | FreeBSD-src-014c3b4511a0b855a5f01e9ff71c89ca1364bd95.zip FreeBSD-src-014c3b4511a0b855a5f01e9ff71c89ca1364bd95.tar.gz |
Fixed misspelling of IPPORT_MAX as USHRT_MAX. Don't include <sys/limits.h>
to implement this mistake.
Fixed some nearby style bugs (initialization in declaration, misformatting
of this initialization, missing blank line after the declaration, and
comparision of the non-boolean result of the initialization with 0 using
"!". In KNF, "!" is not even used to compare booleans with 0).
-rw-r--r-- | sys/netinet/in_pcb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index f0a3bca..369bd23 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -40,7 +40,6 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/limits.h> #include <sys/mac.h> #include <sys/malloc.h> #include <sys/mbuf.h> @@ -109,17 +108,18 @@ int ipport_reservedlow = 0; static int sysctl_net_ipport_check(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, - oidp->oid_arg1, oidp->oid_arg2, req); - if (!error) { + int error; + + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + if (error == 0) { RANGECHK(ipport_lowfirstauto, 1, IPPORT_RESERVED - 1); RANGECHK(ipport_lowlastauto, 1, IPPORT_RESERVED - 1); - RANGECHK(ipport_firstauto, IPPORT_RESERVED, USHRT_MAX); - RANGECHK(ipport_lastauto, IPPORT_RESERVED, USHRT_MAX); - RANGECHK(ipport_hifirstauto, IPPORT_RESERVED, USHRT_MAX); - RANGECHK(ipport_hilastauto, IPPORT_RESERVED, USHRT_MAX); + RANGECHK(ipport_firstauto, IPPORT_RESERVED, IPPORT_MAX); + RANGECHK(ipport_lastauto, IPPORT_RESERVED, IPPORT_MAX); + RANGECHK(ipport_hifirstauto, IPPORT_RESERVED, IPPORT_MAX); + RANGECHK(ipport_hilastauto, IPPORT_RESERVED, IPPORT_MAX); } - return error; + return (error); } #undef RANGECHK |