Suppress a log message properly
authorRonnie Sahlberg <sahlberg@lenovo-laptop.(none)>
Tue, 1 Mar 2011 17:24:15 +0000 (04:24 +1100)
committerRonnie Sahlberg <sahlberg@lenovo-laptop.(none)>
Tue, 1 Mar 2011 17:24:15 +0000 (04:24 +1100)
server/ctdb_daemon.c

index 3eb832e13af38baa319195251cd9604c578b0bbb..4c35b1c7b7928fdc1e67402c5d81e983c57d8740 100644 (file)
@@ -695,8 +695,10 @@ static void sig_child_handler(struct event_context *ev,
 
        while (pid != 0) {
                pid = waitpid(-1, &status, WNOHANG);
-               if (pid == -1 && errno != ECHILD) {
-                       DEBUG(DEBUG_ERR, (__location__ " waitpid() returned error. errno:%d\n", errno));
+               if (pid == -1) {
+                       if (errno != ECHILD) {
+                               DEBUG(DEBUG_ERR, (__location__ " waitpid() returned error. errno:%d\n", errno));
+                       }
                        return;
                }
                if (pid > 0) {