]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/exec-util: null_or_empty_path() does not return boolean 27040/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Mar 2023 16:50:31 +0000 (18:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Mar 2023 16:50:31 +0000 (18:50 +0200)
We shouldn't report that the file is empty if the stating fails. Let's do the
same as in other places, and just ignore the error and let the subsequent
operation fail.

src/shared/exec-util.c

index ac68cbc4cb16681e3d25cecb3cba6567310c4b67..a2e8f428e691cedbca9e725c08a381e262485a61 100644 (file)
@@ -39,7 +39,7 @@ static int do_spawn(const char *path, char *argv[], int stdout_fd, pid_t *pid, b
         pid_t _pid;
         int r;
 
-        if (null_or_empty_path(path)) {
+        if (null_or_empty_path(path) > 0) {
                 log_debug("%s is empty (a mask).", path);
                 return 0;
         }