From 50a69818a738b31e47cfed9af3b2110e5b50b7d6 Mon Sep 17 00:00:00 2001 From: Nils <> Date: Wed, 1 Jul 2020 14:37:17 +0200 Subject: [PATCH] adjust to code style --- src/nsmd.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nsmd.cpp b/src/nsmd.cpp index cabd932..7b65ba6 100644 --- a/src/nsmd.cpp +++ b/src/nsmd.cpp @@ -325,7 +325,7 @@ handle_client_process_death ( int pid ) { Client *c = get_client_by_pid( (int)pid ); - if ( c != NULL) + if ( c ) { //There is a difference if a client quit on its own, e.g. via a menu or window manager, //or if the server send SIGTERM as quit signal. Both cases are equally valid. @@ -395,14 +395,13 @@ void handle_sigchld ( ) //One child process has stopped. Find which and figure out the stop-conditions Client *c; c = get_client_by_pid( pid ); - if ( c != NULL ) + if ( c ) { //The following will not trigger with normal crashes, e.g. segfaults or python tracebacks if ( WIFEXITED( status ) ) // returns true if the child terminated normally if ( WEXITSTATUS(status) == 255 ) // as given by exit(-1) in launch() c->launch_error = true; } - // Call even if Client was already null. This will check itself again and was expected // to be called for the majority of nsmds development handle_client_process_death( pid );