summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2004-06-26 23:17:27 +0000
committermbr <mbr@FreeBSD.org>2004-06-26 23:17:27 +0000
commit4fa2b98722155cd826f26aae018f216f7238c43c (patch)
treee26d13d4785303fb4690156bd9d024cee5375358 /contrib
parent168c9789577447637f3de0dfa42e712d243641e6 (diff)
downloadFreeBSD-src-4fa2b98722155cd826f26aae018f216f7238c43c.zip
FreeBSD-src-4fa2b98722155cd826f26aae018f216f7238c43c.tar.gz
Use int32_t to convert the leasetime to fix support for platforms
where time_t is 64-bit. Submitted by: des
Diffstat (limited to 'contrib')
-rw-r--r--contrib/isc-dhcp/common/parse.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/isc-dhcp/common/parse.c b/contrib/isc-dhcp/common/parse.c
index 54394f2..90f01c3 100644
--- a/contrib/isc-dhcp/common/parse.c
+++ b/contrib/isc-dhcp/common/parse.c
@@ -34,7 +34,8 @@
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.104.2.17 2004/06/17 20:54:38 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.104.2.17 2004/06/17 20:54:38 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"
+"$FreeBSD$";
#endif /* not lint */
#include "dhcpd.h"
@@ -405,6 +406,7 @@ void parse_lease_time (cfile, timep)
{
const char *val;
enum dhcp_token token;
+ int32_t num;
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
@@ -412,9 +414,9 @@ void parse_lease_time (cfile, timep)
skip_to_semi (cfile);
return;
}
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
/* Unswap the number - convert_num returns stuff in NBO. */
- *timep = ntohl (*timep); /* XXX */
+ *timep = ntohl (num);
parse_semi (cfile);
}
OpenPOWER on IntegriCloud