]> 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 10:50:55 +0000 (12:50 +0200)
lib/isc/netmgr/http.c

index 814deaf3713dd234edcfc819248d436bf322d149..645f256059972338fd03af817e85d24714e585fc 100644 (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';