diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 483c06aff2..0699fdb6b6 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -61,13 +61,6 @@ typedef enum { allow_update_forwarding } acl_type_t; -#define RETERR(x) \ - do { \ - isc_result_t _r = (x); \ - if (_r != ISC_R_SUCCESS) \ - return ((_r)); \ - } while (0) - #define CHECK(x) \ do { \ result = (x); \ @@ -577,9 +570,12 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone, isc_region_t region; /* Create the DB beforehand */ - RETERR(dns_db_create(mctx, dbtype, dns_zone_getorigin(zone), - dns_dbtype_stub, dns_zone_getclass(zone), 0, NULL, - &db)); + result = dns_db_create(mctx, dbtype, dns_zone_getorigin(zone), + dns_dbtype_stub, dns_zone_getclass(zone), 0, + NULL, &db); + if (result != ISC_R_SUCCESS) { + return result; + } dns_rdataset_init(&rdataset); diff --git a/lib/dns/nsec.c b/lib/dns/nsec.c index 8e34772dca..255b9e9364 100644 --- a/lib/dns/nsec.c +++ b/lib/dns/nsec.c @@ -30,13 +30,6 @@ #include -#define RETERR(x) \ - do { \ - result = (x); \ - if (result != ISC_R_SUCCESS) \ - goto failure; \ - } while (0) - void dns_nsec_setbit(unsigned char *array, unsigned int type, unsigned int bit) { unsigned int shift, mask; @@ -189,7 +182,10 @@ dns_nsec_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node, dns_rdataset_init(&rdataset); dns_rdata_init(&rdata); - RETERR(dns_nsec_buildrdata(db, version, node, target, data, &rdata)); + result = dns_nsec_buildrdata(db, version, node, target, data, &rdata); + if (result != ISC_R_SUCCESS) { + goto failure; + } dns_rdatalist_init(&rdatalist); rdatalist.rdclass = dns_db_class(db);