]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tools: memvprintf(): remove <out> check that always true
authorEgor Shestakov <egor@ved1.me>
Wed, 8 Apr 2026 15:24:56 +0000 (15:24 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 13 Apr 2026 12:36:52 +0000 (14:36 +0200)
memvprintf() exits early if the <out> is NULL, so the further NULL check is
redundant.

No backport needed.

src/tools.c

index 49398ae3d9e2275ecd8ef2e1fecc42d3a707f664..12481ce1eecf75f1e531e5d9ce44ac56c6908a9d 100644 (file)
@@ -4678,10 +4678,8 @@ char *memvprintf(char **out, const char *format, va_list orig_args)
                ha_free(&ret);
        }
 
-       if (out) {
-               free(*out);
-               *out = ret;
-       }
+       free(*out);
+       *out = ret;
 
        return ret;
 }