diff options
| author | 2020-02-16 21:10:07 +0000 | |
|---|---|---|
| committer | 2020-02-16 21:10:07 +0000 | |
| commit | 98bc8dcc0bb5e3fc5a70661ee6d6ecf1af11cd26 (patch) | |
| tree | f7e5377705f64abbeefcc6bf98d6985b638b96b0 /usr.bin/dig/lib/isc/unix/time.c | |
| parent | unravel isc_time_formattimestamp (diff) | |
| download | wireguard-openbsd-98bc8dcc0bb5e3fc5a70661ee6d6ecf1af11cd26.tar.xz wireguard-openbsd-98bc8dcc0bb5e3fc5a70661ee6d6ecf1af11cd26.zip | |
Move isc_time_formathttptimestamp to the only place it is used.
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/unix/time.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c index bdc2ea89c0a..34b3115a9dc 100644 --- a/usr.bin/dig/lib/isc/unix/time.c +++ b/usr.bin/dig/lib/isc/unix/time.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.15 2020/02/16 21:09:32 florian Exp $ */ +/* $Id: time.c,v 1.16 2020/02/16 21:10:07 florian Exp $ */ /*! \file */ @@ -66,21 +66,3 @@ isc_time_microdiff(const struct timespec *t1, const struct timespec *t2) { return ((res.tv_sec * NS_PER_S + res.tv_nsec) / NS_PER_US); } - -void -isc_time_formathttptimestamp(const struct timespec *t, char *buf, unsigned int len) { - unsigned int flen; - - REQUIRE(t != NULL); - INSIST(t->tv_nsec < NS_PER_S); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - /* - * 5 spaces, 1 comma, 3 GMT, 2 %d, 4 %Y, 8 %H:%M:%S, 3+ %a, 3+ %b (29+) - */ - - flen = strftime(buf, len, "%a, %d %b %Y %H:%M:%S GMT", - gmtime(&t->tv_sec)); - INSIST(flen < len); -} |
