diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-08-18 15:27:57 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-08-18 15:27:57 +0000 |
commit | 8c5ac55b147c2612c5b7813852630849f5d98c9f (patch) | |
tree | a11738fed609b5090b87a751276a6379900bdac9 | |
parent | 3521a9c09e3a4ef204505047ca1a9e70f7c32e9c (diff) |
Don't try to printf() a time_t value with %d. Cast to (int) just
in case time_t ever changes size. Values in these cases are intervals,
i.e. (time_t - time_t) so int/%d will be fine.
Part of larger time_t rectification diff from guenther@.
-rw-r--r-- | sbin/dhclient/dhclient.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 6c0b7dc9dde..f717994550b 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.147 2012/08/18 00:20:01 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.148 2012/08/18 15:27:56 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -680,7 +680,7 @@ bind_lease(void) note("bound to %s -- renewal in %d seconds.", piaddr(client->active->address), - client->active->renewal - cur_time); + (int)(client->active->renewal - cur_time)); client->state = S_BOUND; reinitialize_interface(); go_daemon(); @@ -993,8 +993,8 @@ state_panic(void) client->active->renewal) { client->state = S_BOUND; note("bound: renewal in %d seconds.", - client->active->renewal - - cur_time); + (int)(client->active->renewal - + cur_time)); set_timeout(client->active->renewal, state_bound); } else { |