mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-07 14:18:18 +02:00
75608547b4kernel: Remove NONNULL annotation from destroy method (Alexander Wiederin) Pull request description: Follow-up to https://github.com/bitcoin/bitcoin/pull/33796#discussion_r2959817508 ### Summary This PR removes the `BITCOINKERNEL_ARG_NONNULL` annotation from the `btck_block_validation_state_destroy` method in the Kernel API. ### Motivation No other *_destroy function in the Kernel API carries the NONNULL annotation. Following the convention set by free(), destroy functions should accept null pointers. ### Usage: Before: ```c btck_BlockValidationState* state = NULL; btck_block_validation_state_destroy(state); // violates nonnull contract ``` After: ```c btck_BlockValidationState* state = NULL; btck_block_validation_state_destroy(state); // well-defined ``` ACKs for top commit: yuvicc: lgtm! ACK75608547b4kevkevinpal: ACK [7560854](75608547b4) achow101: ACK75608547b4janb84: ACK75608547b4theStack: ACK75608547b4w0xlt: ACK75608547b4stickies-v: ACK75608547b4Tree-SHA512: 9577098940f49b8f7fd1fb20afe750e9eaaf9d90d25ec3c4f423de223a1fbd0bca6d520061f576eb3923f18e1f2744b3f60d0d0715dfa3832fea83cb538170c2