]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/path.c
Merge pull request #17732 from yuwata/core-use-synthetic_errno
[thirdparty/systemd.git] / src / core / path.c
index ca3a91df27973f34b9eea631c8cc5d6f2a62f993..b954ee1f47d30f33d84e05db5e08f792f1380bda 100644 (file)
@@ -283,10 +283,8 @@ static int path_verify(Path *p) {
         assert(p);
         assert(UNIT(p)->load_state == UNIT_LOADED);
 
-        if (!p->specs) {
-                log_unit_error(UNIT(p), "Path unit lacks path setting. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!p->specs)
+                return log_unit_error_errno(UNIT(p), SYNTHETIC_ERRNO(ENOEXEC), "Path unit lacks path setting. Refusing.");
 
         return 0;
 }