]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use SET_IF_NOT_NULL in isc__nm_base64*
authorMichal Nowak <mnowak@isc.org>
Tue, 21 Oct 2025 09:00:36 +0000 (11:00 +0200)
committerMichal Nowak <mnowak@isc.org>
Wed, 22 Oct 2025 11:30:33 +0000 (11:30 +0000)
(cherry picked from commit d91e8ed57500a48b86fee9cd12b1964f639e63b5)

lib/isc/netmgr/http.c

index 935e84c40e72010db66547edc3042a7da8c544b3..32d632bb181773d91e3fd83495807d8a898bdf5e 100644 (file)
@@ -3582,9 +3582,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';
 
@@ -3635,9 +3633,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';