]> git.ipfire.org Git - thirdparty/bind9.git/commit
standardize CHECK and RETERR macros
authorEvan Hunt <each@isc.org>
Wed, 21 May 2025 20:22:58 +0000 (13:22 -0700)
committerEvan Hunt <each@isc.org>
Thu, 4 Dec 2025 03:17:20 +0000 (19:17 -0800)
commit25c9fb54daaf71fdaa4a53501ad9864b3db6264e
treed7dfdfb034a0eaf31448600a6826795524cf3d9f
parent81f0b03f658cc0b3da6850a89615ab7681bc18b3
standardize CHECK and RETERR macros

previously, there were over 40 separate definitions of CHECK macros, of
which most used "goto cleanup", and the rest "goto failure" or "goto
out". there were another 10 definitions of RETERR, of which most were
identical to CHECK, but some simply returned a result code instead of
jumping to a cleanup label.

this has now been standardized throughout the code base: RETERR is for
returning an error code in the case of an error, and CHECK is for jumping
to a cleanup tag, which is now always called "cleanup". both macros are
defined in isc/util.h.

(cherry picked from commit 52bba5cc343cb105232bb1631b97a8577b751fee)
73 files changed:
bin/check/check-tool.c
bin/check/named-checkconf.c
bin/delv/delv.c
bin/dnssec/dnssec-ksr.c
bin/named/controlconf.c
bin/named/logconf.c
bin/named/server.c
bin/named/statschannel.c
bin/named/tkeyconf.c
bin/named/transportconf.c
bin/named/zoneconf.c
bin/plugins/filter-a.c
bin/plugins/filter-aaaa.c
bin/tests/system/dlzexternal/driver/driver.c
bin/tests/system/dyndb/driver/util.h
bin/tests/system/dyndb/driver/zone.c
bin/tests/system/hooks/driver/test-async.c
bin/tests/system/pipelined/pipequeries.c
bin/tests/system/rsabigexponent/bigkey.c
bin/tools/mdig.c
fuzz/dns_qpkey_name.c
fuzz/dns_rdata_fromwire_text.c
fuzz/fuzz.h
fuzz/isc_lex_getmastertoken.c
fuzz/isc_lex_gettoken.c
lib/dns/client.c
lib/dns/diff.c
lib/dns/dnssec.c
lib/dns/dnstap.c
lib/dns/dst_api.c
lib/dns/dst_parse.c
lib/dns/dyndb.c
lib/dns/gssapictx.c
lib/dns/journal.c
lib/dns/keymgr.c
lib/dns/masterdump.c
lib/dns/nsec3.c
lib/dns/openssl_link.c
lib/dns/opensslecdsa_link.c
lib/dns/openssleddsa_link.c
lib/dns/opensslrsa_link.c
lib/dns/private.c
lib/dns/qpcache.c
lib/dns/qpzone.c
lib/dns/rbt-cachedb.c
lib/dns/rbt-zonedb.c
lib/dns/rbt.c
lib/dns/rbtdb.c
lib/dns/rcode.c
lib/dns/rdata.c
lib/dns/resconf.c
lib/dns/skr.c
lib/dns/tkey.c
lib/dns/ttl.c
lib/dns/update.c
lib/dns/view.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/isc/base32.c
lib/isc/base64.c
lib/isc/hex.c
lib/isc/httpd.c
lib/isc/include/isc/util.h
lib/isccfg/namedconf.c
lib/isccfg/parser.c
lib/ns/hooks.c
lib/ns/update.c
lib/ns/xfrout.c
tests/bench/load-names.c
tests/dns/qpdb_test.c
tests/dns/qpzone_test.c
tests/dns/tsig_test.c
tests/dns/update_test.c