]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.20] fix: dev: standardize CHECK and RETERR macros
authorEvan Hunt <each@isc.org>
Thu, 4 Dec 2025 04:21:30 +0000 (04:21 +0000)
committerEvan Hunt <each@isc.org>
Thu, 4 Dec 2025 04:21:30 +0000 (04:21 +0000)
commitef714e91acf7d5333f77e95476cbe99886cc8a0d
treed7dfdfb034a0eaf31448600a6826795524cf3d9f
parent81f0b03f658cc0b3da6850a89615ab7681bc18b3
parent25c9fb54daaf71fdaa4a53501ad9864b3db6264e
[9.20] fix: dev: 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.

Backport of MR !10472

Merge branch 'each-check-and-cleanup-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11069