From 98bc8dcc0bb5e3fc5a70661ee6d6ecf1af11cd26 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 16 Feb 2020 21:10:07 +0000 Subject: Move isc_time_formathttptimestamp to the only place it is used. OK millert --- usr.bin/dig/lib/isc/unix/time.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'usr.bin/dig/lib/isc/unix/time.c') 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); -} -- cgit v1.2.3-59-g8ed1b