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).
This commit is contained in:
Bruce Evans 2004-04-06 10:59:11 +00:00
parent 295ed75297
commit 30a4ab088a

View File

@ -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