]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Nit changes in keymgr and kasp
authorMatthijs Mekking <matthijs@isc.org>
Tue, 21 Jun 2022 10:45:54 +0000 (12:45 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 28 Jun 2022 09:56:31 +0000 (11:56 +0200)
Use the ISC_MAX define instead of "x = a > b ? a : b" paradigm.

Remove an unneeded include.

lib/dns/keymgr.c
lib/isccfg/include/isccfg/kaspconf.h

index a75121fd394c28de5b56373fde416b106e260356..4a3f3fe74577d9b2eddcb255a1bc055b3cdf0231 100644 (file)
@@ -131,12 +131,12 @@ keymgr_settime_remove(dns_dnsseckey_t *key, dns_kasp_t *kasp) {
                             dns_kasp_retiresafety(kasp);
        }
 
-       remove = ksk_remove > zsk_remove ? ksk_remove : zsk_remove;
+       remove = ISC_MAX(ksk_remove, zsk_remove);
        dst_key_settime(key->key, DST_TIME_DELETE, remove);
 }
 
 /*
- * Set the SyncPublish time (when the DS may be submitted to the parent)
+ * Set the SyncPublish time (when the DS may be submitted to the parent).
  *
  */
 static void
@@ -250,7 +250,7 @@ keymgr_prepublication_time(dns_dnsseckey_t *key, dns_kasp_t *kasp,
                                           dns_kasp_zonepropagationdelay(kasp);
                        }
 
-                       syncpub = syncpub1 > syncpub2 ? syncpub1 : syncpub2;
+                       syncpub = ISC_MAX(syncpub1, syncpub2);
                        dst_key_settime(key->key, DST_TIME_SYNCPUBLISH,
                                        syncpub);
                }
index 65e73e013796641ff0c5464bbd2352d20a59b419..7b1e075fefb4faa04484c10927ed817034ed8c29 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <isc/lang.h>
 
-#include <dns/types.h>
-
 #include <isccfg/cfg.h>
 
 /***