diff options
author | gilles <gilles@openbsd.org> | 2013-04-09 14:51:33 +0000 |
---|---|---|
committer | gilles <gilles@openbsd.org> | 2013-04-09 14:51:33 +0000 |
commit | 035b0708d3756c01a729dc87ecce99f0b0887565 (patch) | |
tree | e9a14eb30cf16bdea46bddb6a1f5f393dedd7951 /usr.sbin/dvmrpctl | |
parent | Retry when SSL_read fails with SSL_ERROR_WANT_READ. Fixes the case where (diff) | |
download | wireguard-openbsd-035b0708d3756c01a729dc87ecce99f0b0887565.tar.xz wireguard-openbsd-035b0708d3756c01a729dc87ecce99f0b0887565.zip |
do not store a time_t or the result of a time_t division in an int
prompted by deraadt@, ok claudio@ chl@ guenther@
Diffstat (limited to 'usr.sbin/dvmrpctl')
-rw-r--r-- | usr.sbin/dvmrpctl/dvmrpctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/dvmrpctl/dvmrpctl.c b/usr.sbin/dvmrpctl/dvmrpctl.c index 8cf8473afe9..1fba47be384 100644 --- a/usr.sbin/dvmrpctl/dvmrpctl.c +++ b/usr.sbin/dvmrpctl/dvmrpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvmrpctl.c,v 1.9 2009/11/02 20:32:17 claudio Exp $ */ +/* $OpenBSD: dvmrpctl.c,v 1.10 2013/04/09 14:51:33 gilles Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -449,7 +449,8 @@ fmt_timeframe_core(time_t t) char *buf; static char tfbuf[TF_BUFS][TF_LEN]; /* ring buffer */ static int idx = 0; - unsigned int sec, min, hrs, day, week; + unsigned int sec, min, hrs, day; + unsigned long long week; if (t == 0) return ("Stopped"); @@ -470,7 +471,7 @@ fmt_timeframe_core(time_t t) week /= 7; if (week > 0) - snprintf(buf, TF_LEN, "%02uw%01ud%02uh", week, day, hrs); + snprintf(buf, TF_LEN, "%02lluw%01ud%02uh", week, day, hrs); else if (day > 0) snprintf(buf, TF_LEN, "%01ud%02uh%02um", day, hrs, min); else |