various: use modern strv helpers

If we're building a strv, let's just use strv_new() with the CONF_PATHS macro,
which gives as an exploded string set.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2024-02-28 11:10:34 +01:00
parent eafadb91ce
commit 8f43182847
5 changed files with 6 additions and 10 deletions
+2 -4
View File
@@ -252,11 +252,9 @@ int strv_extend_strv_concat(char ***a, char * const *b, const char *suffix) {
if (!v)
return -ENOMEM;
r = strv_push(a, v);
if (r < 0) {
free(v);
r = strv_consume(a, v);
if (r < 0)
return r;
}
}
return 0;