summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-11-11 23:06:51 +0000
committerderaadt <deraadt@openbsd.org>2013-11-11 23:06:51 +0000
commit27dd928d66a593c50e93e6b5c27b6743df505472 (patch)
tree688c632237a55ae64253d800864481205c2f0e7b
parentdisable kerberos support (only used for pserver, which we strongly (diff)
downloadwireguard-openbsd-27dd928d66a593c50e93e6b5c27b6743df505472.tar.xz
wireguard-openbsd-27dd928d66a593c50e93e6b5c27b6743df505472.zip
%lld for time_t even if division occurs
-rw-r--r--usr.bin/w/pr_time.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c
index 526a81507da..462d9aa8432 100644
--- a/usr.bin/w/pr_time.c
+++ b/usr.bin/w/pr_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pr_time.c,v 1.14 2009/10/27 23:59:49 deraadt Exp $ */
+/* $OpenBSD: pr_time.c,v 1.15 2013/11/11 23:06:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -95,10 +95,11 @@ pr_idle(time_t idle)
/* If idle more than an hour, print as HH:MM. */
else if (idle >= SECSPERHOUR)
- (void)printf(" %2d:%02d ",
- idle / SECSPERHOUR, (idle % SECSPERHOUR) / SECSPERMIN);
+ (void)printf(" %2lld:%02lld ",
+ (long long)idle / SECSPERHOUR,
+ ((long long)idle % SECSPERHOUR) / SECSPERMIN);
/* Else print the minutes idle. */
else
- (void)printf(" %2d ", idle / SECSPERMIN);
+ (void)printf(" %2lld ", (long long)idle / SECSPERMIN);
}