util: don't call function in macro argument

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/342>
This commit is contained in:
Kacper Piwiński 2025-06-29 07:48:45 +00:00
parent 1b11d10ff2
commit 54e71e6dd5

View file

@ -238,7 +238,8 @@ char **
strv_append_take(char **strv, char **str)
{
if (str && *str) {
size_t len = max(strv_len(strv) + 1, 2);
size_t len = strv_len(strv) + 1;
len = max(len, 2);
char **s = realloc(strv, len * sizeof(*strv));
if (!s)