diff options
author | des <des@FreeBSD.org> | 2004-07-06 15:15:14 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-07-06 15:15:14 +0000 |
commit | 7c905c6c6ca553210ff7dcc2a016e4aaf7d3750c (patch) | |
tree | 5afe645c04263acc3cc4605480900b5778e8ad15 /contrib/isc-dhcp/client/dhclient.c | |
parent | 2820cb04742e5041387dcda61f326a7da26b569e (diff) | |
download | FreeBSD-src-7c905c6c6ca553210ff7dcc2a016e4aaf7d3750c.zip FreeBSD-src-7c905c6c6ca553210ff7dcc2a016e4aaf7d3750c.tar.gz |
Fix a number of incorrect assumptions regarding the size of time_t.
The code has its own TIME type, which is actually defined to time_t,
but it still used u_int32_t in some places.
In addition, dhclient not only had two separate global cur_time
variables, one of which was defined as u_int32_t and the other as
TIME, but cur_time was sometimes shadowed by local variables, leading
to widespread confusion as to which of these variable was being
referenced.
There is a lesson in here somewhere: a decent compiler with warnings
enabled should have caught all of this long before it became a
problem.
This patch has been submitted to the vendor, but it will likely be
some time before they release a version that includes it.
Approved by: mbr
Diffstat (limited to 'contrib/isc-dhcp/client/dhclient.c')
-rw-r--r-- | contrib/isc-dhcp/client/dhclient.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/isc-dhcp/client/dhclient.c b/contrib/isc-dhcp/client/dhclient.c index cc4061a..00e681f 100644 --- a/contrib/isc-dhcp/client/dhclient.c +++ b/contrib/isc-dhcp/client/dhclient.c @@ -46,7 +46,7 @@ static char ocopyright[] = #include <net80211/ieee80211.h> #endif -TIME cur_time; +extern TIME cur_time; TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ |