]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3212] NULLs refactor
authorPiotrek Zadroga <piotrek@isc.org>
Mon, 26 Feb 2024 11:08:28 +0000 (12:08 +0100)
committerPiotrek Zadroga <piotrek@isc.org>
Wed, 20 Mar 2024 15:17:29 +0000 (15:17 +0000)
- introduce 0 instead of NULL

src/lib/dns/time_utils.cc

index 3af614959e4aedeaed72ef197d35035156e608f4..5c72cd08dd719ced24bb68fb0371c87c86a7866b 100644 (file)
@@ -103,16 +103,16 @@ timeToText64(uint64_t value) {
 // intended for testing purposes, so, even if it's visible outside of this
 // library, it's not even declared in a header file.
 namespace detail {
-int64_t (*getTimeFunction)() = NULL;
+int64_t (*getTimeFunction)() = 0;
 
 int64_t
 getTimeWrapper() {
-    if (getTimeFunction != NULL) {
+    if (getTimeFunction != 0) {
         return (getTimeFunction());
     }
 
     struct timeval now;
-    gettimeofday(&now, NULL);
+    gettimeofday(&now, 0);
 
     return (static_cast<int64_t>(now.tv_sec));
 }