]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
escape: use strextend()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 May 2021 05:22:58 +0000 (14:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 May 2021 09:18:56 +0000 (18:18 +0900)
src/escape/escape.c

index 3178f9b1724159a12a52e4de42231458db219316..1575a684107709170c93c7924ca59210c02caeb4 100644 (file)
@@ -188,13 +188,8 @@ static int run(int argc, char *argv[]) {
 
                                 free_and_replace(e, x);
                         } else if (arg_suffix) {
-                                char *x;
-
-                                x = strjoin(e, ".", arg_suffix);
-                                if (!x)
+                                if (!strextend(&e, ".", arg_suffix))
                                         return log_oom();
-
-                                free_and_replace(e, x);
                         }
 
                         break;