2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Apply the SET_IF_NOT_NULL() semantic patch

spatch --sp-file cocci/set_if_not_null.spatch --use-gitgrep --dir "." --include-headers --in-place
This commit is contained in:
Tony Finch
2023-04-06 16:32:16 +01:00
committed by Ondřej Surý
parent 0d6dcd217d
commit c622b349e4
28 changed files with 69 additions and 205 deletions

View File

@@ -384,21 +384,13 @@ isc_nm_gettimeouts(isc_nm_t *mgr, uint32_t *initial, uint32_t *idle,
uint32_t *keepalive, uint32_t *advertised) {
REQUIRE(VALID_NM(mgr));
if (initial != NULL) {
*initial = atomic_load_relaxed(&mgr->init);
}
SET_IF_NOT_NULL(initial, atomic_load_relaxed(&mgr->init));
if (idle != NULL) {
*idle = atomic_load_relaxed(&mgr->idle);
}
SET_IF_NOT_NULL(idle, atomic_load_relaxed(&mgr->idle));
if (keepalive != NULL) {
*keepalive = atomic_load_relaxed(&mgr->keepalive);
}
SET_IF_NOT_NULL(keepalive, atomic_load_relaxed(&mgr->keepalive));
if (advertised != NULL) {
*advertised = atomic_load_relaxed(&mgr->advertised);
}
SET_IF_NOT_NULL(advertised, atomic_load_relaxed(&mgr->advertised));
}
bool