Commit 1189702
committed
Merge bitcoin/bitcoin#34982: kernel: Remove NONNULL annotation from destroy method
7560854 kernel: Remove NONNULL annotation from destroy method (Alexander Wiederin)
Pull request description:
Follow-up to bitcoin/bitcoin#33796 (comment)
### 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! ACK 7560854
kevkevinpal:
ACK [7560854](bitcoin/bitcoin@7560854)
achow101:
ACK 7560854
janb84:
ACK 7560854
theStack:
ACK 7560854
w0xlt:
ACK 7560854
stickies-v:
ACK 7560854
Tree-SHA512: 9577098940f49b8f7fd1fb20afe750e9eaaf9d90d25ec3c4f423de223a1fbd0bca6d520061f576eb3923f18e1f2744b3f60d0d0715dfa3832fea83cb538170c21 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1344 | 1344 | | |
1345 | 1345 | | |
1346 | 1346 | | |
1347 | | - | |
| 1347 | + | |
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
| |||
0 commit comments