From: Erast Benson Date: Sat, 15 Mar 2008 15:13:35 +0000 (+0200) Subject: s-s-d: Move 'return' inside preprocessor conditionals X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d02a285c9a529b474760cf62f492a3cd592bdceb;p=dpkg s-s-d: Move 'return' inside preprocessor conditionals So that it does not just return on non-handled OSes. --- 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))