From 4bd6096d4b0e67e0a1f51179a203a4e442aabb43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 30 Mar 2023 21:15:06 +0200 Subject: [PATCH] Remove isc_stdtime_get() macro Now that isc_stdtime_get() macro is unused, remove it from the header file. --- lib/dns/include/dns/adb.h | 4 ---- lib/dns/time.c | 2 +- lib/isc/include/isc/stdtime.h | 9 +-------- tests/dns/update_test.c | 2 +- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h index 0b96ee081f..b5b88abb8f 100644 --- a/lib/dns/include/dns/adb.h +++ b/lib/dns/include/dns/adb.h @@ -369,10 +369,6 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg, *\li #ISC_R_NOMEMORY insufficient resources *\li #DNS_R_ALIAS 'name' is an alias for another name. * - * Calls, and returns error codes from: - * - *\li isc_stdtime_get() - * * Notes: * *\li No internal reference to "name" exists after this function diff --git a/lib/dns/time.c b/lib/dns/time.c index cffcb05eb6..dcec7c7964 100644 --- a/lib/dns/time.c +++ b/lib/dns/time.c @@ -107,7 +107,7 @@ dns_time64_from32(uint32_t value) { /* * Adjust the time to the closest epoch. This should be changed - * to use a 64-bit counterpart to isc_stdtime_get() if one ever + * to use a 64-bit counterpart to isc_stdtime_now() if one ever * is defined, but even the current code is good until the year * 2106. */ diff --git a/lib/isc/include/isc/stdtime.h b/lib/isc/include/isc/stdtime.h index 0b13dd351e..59cd058b5c 100644 --- a/lib/isc/include/isc/stdtime.h +++ b/lib/isc/include/isc/stdtime.h @@ -29,20 +29,13 @@ typedef uint32_t isc_stdtime_t; ISC_LANG_BEGINDECLS -/* */ + isc_stdtime_t isc_stdtime_now(void); /*%< * Return the number of seconds since 00:00:00 UTC, January 1, 1970. */ -/* Compatibility macro */ -#define isc_stdtime_get(tp) \ - { \ - REQUIRE(tp != NULL); \ - *tp = isc_stdtime_now(); \ - } - void isc_stdtime_tostring(isc_stdtime_t t, char *out, size_t outlen); /* diff --git a/tests/dns/update_test.c b/tests/dns/update_test.c index 5ec4002db5..7832cbcf7e 100644 --- a/tests/dns/update_test.c +++ b/tests/dns/update_test.c @@ -32,7 +32,7 @@ #define KEEP_BEFORE /* - * Fix the linking order problem for overridden isc_stdtime_get() by making + * Fix the linking order problem for overridden isc_stdtime_now() by making * everything local. This also allows static functions from update.c to be * tested. */