diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/inet.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/common/inet.c b/common/inet.c index 1d1e6c53..39845a82 100644 --- a/common/inet.c +++ b/common/inet.c @@ -4,7 +4,9 @@ way... */ /* - * Copyright (c) 2004,2005,2007-2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2007-2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004,2005 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -610,9 +612,9 @@ piaddrcidr(const struct iaddr *addr, unsigned int bits) { u_int16_t validate_port(char *port) { - int local_port = 0; - int lower = 1; - int upper = 65535; + long local_port = 0; + long lower = 1; + long upper = 65535; char *endptr; errno = 0; @@ -622,8 +624,8 @@ validate_port(char *port) { log_fatal ("Invalid port number specification: %s", port); if (local_port < lower || local_port > upper) - log_fatal("Port number specified is out of range (%d-%d).", + log_fatal("Port number specified is out of range (%ld-%ld).", lower, upper); - return htons(local_port); + return htons((u_int16_t)local_port); } |