core: use SYNTHETIC_ERRNO() macro

This commit is contained in:
Yu Watanabe
2020-11-27 14:35:20 +09:00
parent 2762ce2d89
commit d85ff94477
14 changed files with 95 additions and 177 deletions
+2 -4
View 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;
}