diff options
author | 2013-04-16 22:13:30 +0000 | |
---|---|---|
committer | 2013-04-16 22:13:30 +0000 | |
commit | 3cd2737ede4ffc8fc282da01dcccbd52612e4702 (patch) | |
tree | f05c3cf595da08334f848cb028b91e08b57daf3d | |
parent | remove unneccessary time_t * cast (diff) | |
download | wireguard-openbsd-3cd2737ede4ffc8fc282da01dcccbd52612e4702.tar.xz wireguard-openbsd-3cd2737ede4ffc8fc282da01dcccbd52612e4702.zip |
handle larger time_t types
-rw-r--r-- | bin/csh/time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/csh/time.c b/bin/csh/time.c index 83bb020988e..0550dac75b3 100644 --- a/bin/csh/time.c +++ b/bin/csh/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.12 2009/10/27 23:59:21 deraadt Exp $ */ +/* $OpenBSD: time.c,v 1.13 2013/04/16 22:13:30 deraadt Exp $ */ /* $NetBSD: time.c,v 1.7 1995/03/21 13:55:25 mycroft Exp $ */ /*- @@ -228,7 +228,8 @@ pdeltat(struct timeval *t1, struct timeval *t0) struct timeval td; timersub(t1, t0, &td); - (void) fprintf(cshout, "%ld.%01ld", td.tv_sec, td.tv_usec / 100000); + (void) fprintf(cshout, "%lld.%01ld", (long long)td.tv_sec, + td.tv_usec / 100000); } #define P2DIG(i) (void) fprintf(cshout, "%d%d", (i) / 10, (i) % 10) |