]> err.no Git - dpkg/commitdiff
s-s-d: Move 'return' inside preprocessor conditionals
authorErast Benson <erast@gnusolaris.org>
Sat, 15 Mar 2008 15:13:35 +0000 (17:13 +0200)
committerGuillem Jover <guillem@debian.org>
Sun, 16 Mar 2008 05:32:36 +0000 (07:32 +0200)
So that it does not just return on non-handled OSes.

ChangeLog
utils/start-stop-daemon.c

index 7581f18a5fde6383456a145c640948418823677c..3e181d72dad252dbc022428c7ec116a071617d61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-15  Erast Benson  <erast@gnusolaris.org>
+
+       * 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  <erast@gnusolaris.org>
 
        * utils/start-stop-daemon.c: Use __sun instead of __sparc__ to
index c02bd6af736a6fb4d0b93736f188821c2d3c626f..72ad5183bbd5d4b06c6bd6f80c91cce5554ce88b 100644 (file)
@@ -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))