string-util: imply NULL termination of strextend() argument list

The trailing NULL in the argument list is now implied (similar to
what we already have in place in strjoin()).
This commit is contained in:
Lennart Poettering
2021-01-06 17:24:46 +01:00
parent 0ec1dc5ba3
commit c2bc710b24
23 changed files with 61 additions and 63 deletions
+3 -3
View File
@@ -290,7 +290,7 @@ static int bus_link_method_set_dns_servers_internal(sd_bus_message *message, voi
goto finalize;
}
if (!strextend_with_separator(&j, ", ", s, NULL)) {
if (!strextend_with_separator(&j, ", ", s)) {
r = -ENOMEM;
goto finalize;
}
@@ -387,7 +387,7 @@ int bus_link_method_set_domains(sd_bus_message *message, void *userdata, sd_bus_
name = prefixed;
}
if (!strextend_with_separator(&j, ", ", name, NULL))
if (!strextend_with_separator(&j, ", ", name))
return -ENOMEM;
}
@@ -702,7 +702,7 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
if (r < 0)
return r;
if (!strextend_with_separator(&j, ", ", *i, NULL))
if (!strextend_with_separator(&j, ", ", *i))
return -ENOMEM;
}