diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-05-20 14:41:48 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-05-20 21:57:09 +0900 |
commit | eda397c96607eadf5e881d4a4a62d7ea345a655a (patch) | |
tree | 3d7779a2f468415fd23128147fb07795f81ca100 /src/run/run.c | |
parent | cfea7618f28562c053a1ee194108feaa502081ff (diff) | |
download | systemd-eda397c96607eadf5e881d4a4a62d7ea345a655a.tar.gz |
run: use strextend_with_separator()
Diffstat (limited to 'src/run/run.c')
-rw-r--r-- | src/run/run.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/run/run.c b/src/run/run.c index 555f0584c8..38de0322e0 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -667,15 +667,8 @@ static int transient_cgroup_set_properties(sd_bus_message *m) { *end = 0; } - if (!isempty(arg_slice)) { - if (name) { - char *j = strjoin(name, "-", arg_slice); - free_and_replace(name, j); - } else - name = strdup(arg_slice); - if (!name) - return log_oom(); - } + if (!isempty(arg_slice) && !strextend_with_separator(&name, "-", arg_slice)) + return log_oom(); if (!name) return 0; |