]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/partition/growfs.c
coccinelle: make use of SYNTHETIC_ERRNO
[thirdparty/systemd.git] / src / partition / growfs.c
index c089830b0d8a7f2951a3a93168f629131e038018..8e04eb3c23c72bcae15f4bc915360e38957ff401 100644 (file)
@@ -211,11 +211,10 @@ static int parse_argv(int argc, char *argv[]) {
                         assert_not_reached("Unhandled option");
                 }
 
-        if (optind + 1 != argc) {
-                log_error("%s excepts exactly one argument (the mount point).",
-                          program_invocation_short_name);
-                return -EINVAL;
-        }
+        if (optind + 1 != argc)
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "%s excepts exactly one argument (the mount point).",
+                                       program_invocation_short_name);
 
         arg_target = argv[optind];