From 014c3b4511a0b855a5f01e9ff71c89ca1364bd95 Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 6 Apr 2004 10:59:11 +0000 Subject: Fixed misspelling of IPPORT_MAX as USHRT_MAX. Don't include 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). --- sys/netinet/in_pcb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sys/netinet') 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 #include -#include #include #include #include @@ -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 -- cgit v1.1