diff options
author | 2013-04-02 06:04:50 +0000 | |
---|---|---|
committer | 2013-04-02 06:04:50 +0000 | |
commit | 42cfecbbf15d82750b424ec380247b691a5f3aab (patch) | |
tree | 0c0212f8def7aadedf8b08dec97074d813720d53 | |
parent | handle large time_t (diff) | |
download | wireguard-openbsd-42cfecbbf15d82750b424ec380247b691a5f3aab.tar.xz wireguard-openbsd-42cfecbbf15d82750b424ec380247b691a5f3aab.zip |
Handle big time_t
ok deraadt@
-rw-r--r-- | usr.bin/top/utils.c | 6 | ||||
-rw-r--r-- | usr.sbin/authpf/authpf.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c index b0a19d63507..3eaef986555 100644 --- a/usr.bin/top/utils.c +++ b/usr.bin/top/utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utils.c,v 1.23 2011/04/10 03:20:59 guenther Exp $ */ +/* $OpenBSD: utils.c,v 1.24 2013/04/02 06:04:50 guenther Exp $ */ /* * Top users/processes display for Unix @@ -285,8 +285,8 @@ format_time(time_t seconds) } else { /* standard method produces MMM:SS */ /* we avoid printf as must as possible to make this quick */ - snprintf(result, sizeof(result), "%3d:%02d", seconds / 60, - seconds % 60); + snprintf(result, sizeof(result), "%3d:%02d", (int)seconds / 60, + (int)seconds % 60); } return (result); } diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c index dd556529b2d..d036bfa850c 100644 --- a/usr.sbin/authpf/authpf.c +++ b/usr.sbin/authpf/authpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authpf.c,v 1.118 2013/01/19 16:58:16 miod Exp $ */ +/* $OpenBSD: authpf.c,v 1.119 2013/04/02 06:04:50 guenther Exp $ */ /* * Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org). @@ -826,8 +826,8 @@ change_filter(int add, const char *luser, const char *ipsrc) remove_stale_rulesets(); gettimeofday(&Tend, NULL); - syslog(LOG_INFO, "removed %s, user %s - duration %ld seconds", - ipsrc, luser, Tend.tv_sec - Tstart.tv_sec); + syslog(LOG_INFO, "removed %s, user %s - duration %d seconds", + ipsrc, luser, (int)(Tend.tv_sec - Tstart.tv_sec)); } return (0); no_mem: |