From d02a285c9a529b474760cf62f492a3cd592bdceb Mon Sep 17 00:00:00 2001 From: Erast Benson Date: Sat, 15 Mar 2008 17:13:35 +0200 Subject: [PATCH] s-s-d: Move 'return' inside preprocessor conditionals So that it does not just return on non-handled OSes. --- ChangeLog | 5 +++++ utils/start-stop-daemon.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7581f18a..3e181d72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-15 Erast Benson + + * utils/start-stop-daemon.c (check): Move 'return' inside preprocessor + conditionals, so that it does not just return on non-handled OSes. + 2008-03-15 Erast Benson * utils/start-stop-daemon.c: Use __sun instead of __sparc__ to diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index c02bd6af..72ad5183 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -803,11 +803,12 @@ check(pid_t pid) { #if defined(OSLinux) || defined(OShpux) if (execname && !pid_is_exec(pid, &exec_stat)) + return; #elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD) /* Let's try this to see if it works */ if (execname && !pid_is_cmd(pid, execname)) -#endif return; +#endif if (userspec && !pid_is_user(pid, user_id)) return; if (cmdname && !pid_is_cmd(pid, cmdname)) -- 2.39.5