summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/isc/unix/time.c
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-02-16 21:08:15 +0000
committerflorian <florian@openbsd.org>2020-02-16 21:08:15 +0000
commitba6f461406771281ee24a2f587b56486c9e1af31 (patch)
treefb17f5defec29aa19ad7ac01739a5ad856ec74f3 /usr.bin/dig/lib/isc/unix/time.c
parentunravel isc_time_isepoch (diff)
downloadwireguard-openbsd-ba6f461406771281ee24a2f587b56486c9e1af31.tar.xz
wireguard-openbsd-ba6f461406771281ee24a2f587b56486c9e1af31.zip
unravel isc_time_compare
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/unix/time.c')
-rw-r--r--usr.bin/dig/lib/isc/unix/time.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c
index 4b3658c3fdb..4d63835291c 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.12 2020/02/16 21:07:33 florian Exp $ */
+/* $Id: time.c,v 1.13 2020/02/16 21:08:15 florian Exp $ */
/*! \file */
@@ -58,22 +58,6 @@ isc_time_now(struct timespec *t) {
return (ISC_R_SUCCESS);
}
-int
-isc_time_compare(const struct timespec *t1, const struct timespec *t2) {
- REQUIRE(t1 != NULL && t2 != NULL);
- INSIST(t1->tv_nsec < NS_PER_S && t2->tv_nsec < NS_PER_S);
-
- if (t1->tv_sec < t2->tv_sec)
- return (-1);
- if (t1->tv_sec > t2->tv_sec)
- return (1);
- if (t1->tv_nsec < t2->tv_nsec)
- return (-1);
- if (t1->tv_nsec > t2->tv_nsec)
- return (1);
- return (0);
-}
-
isc_result_t
isc_time_add(const struct timespec *t, const struct timespec *i, struct timespec *result)
{