Skip to content

Commit 8c89a67

Browse files
committed
Address GCC 7 warnings
1 parent ddc2197 commit 8c89a67

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/daemon.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,17 @@ void signal_handler(int signal)
118118
case SIGTERM:
119119
syslog(LOG_WARNING, "Received SIGTERM signal.");
120120
cleanup_and_exit(EXIT_SUCCESS);
121+
break;
121122

122123
case SIGQUIT:
123124
syslog(LOG_WARNING, "Received SIGQUIT signal.");
124125
cleanup_and_exit(EXIT_SUCCESS);
126+
break;
125127

126128
case SIGINT:
127129
syslog(LOG_WARNING, "Received SIGINT signal.");
128130
cleanup_and_exit(EXIT_SUCCESS);
131+
break;
129132

130133
default:
131134
syslog(LOG_WARNING, "Unhandled signal (%d) %s", signal, strsignal(signal));

src/mbpfan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ t_fans *retrieve_fans()
306306
}
307307
}
308308

309-
if (!fans_found > 0){
309+
if (fans_found == 0){
310310
syslog(LOG_CRIT, "mbpfan could not detect any fan. Please contact the developer.\n");
311311
printf("mbpfan could not detect any fan. Please contact the developer.\n");
312312
exit(EXIT_FAILURE);

0 commit comments

Comments
 (0)