diff --git a/src/daemon.c b/src/daemon.c index a4574e3..bd4a491 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -118,14 +118,17 @@ void signal_handler(int signal) case SIGTERM: syslog(LOG_WARNING, "Received SIGTERM signal."); cleanup_and_exit(EXIT_SUCCESS); + break; case SIGQUIT: syslog(LOG_WARNING, "Received SIGQUIT signal."); cleanup_and_exit(EXIT_SUCCESS); + break; case SIGINT: syslog(LOG_WARNING, "Received SIGINT signal."); cleanup_and_exit(EXIT_SUCCESS); + break; default: syslog(LOG_WARNING, "Unhandled signal (%d) %s", signal, strsignal(signal)); diff --git a/src/mbpfan.c b/src/mbpfan.c index 67958bc..4e20529 100644 --- a/src/mbpfan.c +++ b/src/mbpfan.c @@ -306,7 +306,7 @@ t_fans *retrieve_fans() } } - if (!fans_found > 0){ + if (fans_found == 0){ syslog(LOG_CRIT, "mbpfan could not detect any fan. Please contact the developer.\n"); printf("mbpfan could not detect any fan. Please contact the developer.\n"); exit(EXIT_FAILURE);