rem: dev: Drop single-use RETERR macro
If the RETERR define is only used once in a file, just drop the macro. Merge branch 'matthijs-remove-single-use-define-reterr' into 'main' See merge request isc-projects/bind9!9871
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -30,13 +30,6 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#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);
|
||||
|
||||
Reference in New Issue
Block a user