tree-wide: use strv_extend_strv_consume() where appropriate

This commit is contained in:
Mike Yuan
2024-09-21 00:53:50 +02:00
parent 8a7ade7427
commit a2c8652a2a
20 changed files with 54 additions and 113 deletions
+2 -8
View File
@@ -1220,15 +1220,9 @@ static int parse_argv(int argc, char *argv[]) {
if (isempty(optarg))
arg_services = strv_free(arg_services);
else {
_cleanup_strv_free_ char **l = NULL;
l = strv_split(optarg, ":");
if (!l)
return log_oom();
r = strv_extend_strv(&arg_services, l, true);
r = strv_split_and_extend(&arg_services, optarg, ":", /* filter_duplicates = */ true);
if (r < 0)
return log_oom();
return log_error_errno(r, "Failed to parse -s/--service= argument: %m");
}
break;