tree-wide: propagate the error we got from strv_extend_xyz() to the caller

It's a bit sloppy to return -ENOMEM rather than the actual error we
already returned in the first place (even though it's always going to be
ENOMEM)
This commit is contained in:
Lennart Poettering
2024-01-17 11:32:11 +01:00
parent 4212636763
commit 010cd1dc58
6 changed files with 20 additions and 15 deletions
+1 -1
View File
@@ -1517,7 +1517,7 @@ int get_timezones(char ***ret) {
/* Always include UTC */
r = strv_extend(&zones, "UTC");
if (r < 0)
return -ENOMEM;
return r;
strv_sort(zones);
strv_uniq(zones);