From 7d0c47dad0d4282c3924a654a8fe18fc5d7766f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 28 Mar 2023 18:50:31 +0200 Subject: [PATCH] shared/exec-util: null_or_empty_path() does not return boolean 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/exec-util.c b/src/shared/exec-util.c index ac68cbc4cb1..a2e8f428e69 100644 --- a/src/shared/exec-util.c +++ b/src/shared/exec-util.c @@ -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; } -- 2.47.3