Use SET_IF_NOT_NULL in isc__nm_base64*

This commit is contained in:
Michal Nowak 2025-10-21 11:00:36 +02:00
parent 6db5b9ee14
commit d91e8ed575

View file

@ -3539,9 +3539,7 @@ isc__nm_base64url_to_base64(isc_mem_t *mem, const char *base64url,
INSIST(i == len);
if (res_len != NULL) {
*res_len = len;
}
SET_IF_NOT_NULL(res_len, len);
res[len] = '\0';
@ -3592,9 +3590,7 @@ isc__nm_base64_to_base64url(isc_mem_t *mem, const char *base64,
}
}
end:
if (res_len) {
*res_len = i;
}
SET_IF_NOT_NULL(res_len, i);
res[i] = '\0';