Replace ctl mallctl macros with helper functions

The READ/WRITE/READONLY/WRITEONLY/VERIFY_READ/ASSURED_WRITE/MIB_UNSIGNED/
NEITHER_READ_NOR_WRITE/READ_XOR_WRITE macros hid control flow (goto
label_return) inside the mallctl handlers.  Convert them to memcpy-based
helper functions.

Add error-path tests for the converted handlers and direct unit tests for
the helpers
This commit is contained in:
Slobodan Predolac 2026-06-03 15:28:04 -07:00
parent 07618496fc
commit 4e903a0a32
3 changed files with 1772 additions and 851 deletions

1600
src/ctl.c

File diff suppressed because it is too large Load diff