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/omapip/dispatch.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/omapip/dispatch.c')
-rw-r--r-- | contrib/isc-dhcp/omapip/dispatch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/isc-dhcp/omapip/dispatch.c b/contrib/isc-dhcp/omapip/dispatch.c index fab14be..e10a76a 100644 --- a/contrib/isc-dhcp/omapip/dispatch.c +++ b/contrib/isc-dhcp/omapip/dispatch.c @@ -30,12 +30,14 @@ * ``http://www.isc.org/''. To learn more about Vixie Enterprises, * see ``http://www.vix.com''. To learn more about Nominum, Inc., see * ``http://www.nominum.com''. + * + * $FreeBSD$ */ #include <omapip/omapip_p.h> static omapi_io_object_t omapi_io_states; -u_int32_t cur_time; +TIME cur_time; OMAPI_OBJECT_ALLOC (omapi_io, omapi_io_object_t, omapi_type_io_object) |