From fd34ea8523d10f2091d45d1a0d574a4d76d96522 Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Tue, 21 Jun 2022 12:45:54 +0200 Subject: [PATCH] Nit changes in keymgr and kasp Use the ISC_MAX define instead of "x = a > b ? a : b" paradigm. Remove an unneeded include. (cherry picked from commit 5d6f0de84bc1a899f1174e92dcaf2a1acf3603cf) --- lib/dns/keymgr.c | 6 +++--- lib/isccfg/include/isccfg/kaspconf.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/dns/keymgr.c b/lib/dns/keymgr.c index 990c442ca1..024107a893 100644 --- a/lib/dns/keymgr.c +++ b/lib/dns/keymgr.c @@ -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); } diff --git a/lib/isccfg/include/isccfg/kaspconf.h b/lib/isccfg/include/isccfg/kaspconf.h index 65e73e0137..7b1e075fef 100644 --- a/lib/isccfg/include/isccfg/kaspconf.h +++ b/lib/isccfg/include/isccfg/kaspconf.h @@ -15,8 +15,6 @@ #include -#include - #include /***