diff options
author | 2015-02-09 14:00:03 +0000 | |
---|---|---|
committer | 2015-02-09 14:00:03 +0000 | |
commit | 4b1ac4ad1a04bae432d84c578bc4ccc81212b01f (patch) | |
tree | 52423d37061bd6ab010cd2cc765329985346e474 /lib/libc/time/strftime.c | |
parent | sync (diff) | |
download | wireguard-openbsd-4b1ac4ad1a04bae432d84c578bc4ccc81212b01f.tar.xz wireguard-openbsd-4b1ac4ad1a04bae432d84c578bc4ccc81212b01f.zip |
the one true type of time_t is a signed integer
Diffstat (limited to 'lib/libc/time/strftime.c')
-rw-r--r-- | lib/libc/time/strftime.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libc/time/strftime.c b/lib/libc/time/strftime.c index 98fa6de7000..de1f12cb759 100644 --- a/lib/libc/time/strftime.c +++ b/lib/libc/time/strftime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strftime.c,v 1.23 2015/02/09 13:32:51 tedu Exp $ */ +/* $OpenBSD: strftime.c,v 1.24 2015/02/09 14:00:03 tedu Exp $ */ /* ** Copyright (c) 1989, 1993 ** The Regents of the University of California. All rights reserved. @@ -306,11 +306,8 @@ label: tm = *t; mkt = mktime(&tm); - if (TYPE_SIGNED(time_t)) - (void) snprintf(buf, sizeof buf, - "%ld", (long) mkt); - else (void) snprintf(buf, sizeof buf, - "%lu", (unsigned long) mkt); + (void) snprintf(buf, sizeof buf, + "%ld", (long) mkt); pt = _add(buf, pt, ptlim); } continue; |