summaryrefslogtreecommitdiffstats
path: root/lib/utils_cmd.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-29 11:09:00 +0100
committerGitHub <noreply@github.com>2023-10-29 11:09:00 +0100
commit77e38ac1c025b8431d1834a2c1059f9677c78ab1 (patch)
treeaa8dc016303530e56155826f355cb7e3c3a4ee94 /lib/utils_cmd.c
parent2eea6bb2a04bbfb169bac5f0f7c319f998e8ab87 (diff)
parenteead88edda047843b911afd7b63e7decfee306ce (diff)
downloadmonitoring-plugins-77e38ac.tar.gz
Merge pull request #1953 from RincewindsHat/compiler_warnings-sign-compare
Fixes for -Wsign-compare
Diffstat (limited to 'lib/utils_cmd.c')
-rw-r--r--lib/utils_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c
index cfb2073c..7957ec14 100644
--- a/lib/utils_cmd.c
+++ b/lib/utils_cmd.c
@@ -390,13 +390,12 @@ cmd_file_read ( char *filename, output *out, int flags)
390void 390void
391timeout_alarm_handler (int signo) 391timeout_alarm_handler (int signo)
392{ 392{
393 size_t i;
394 if (signo == SIGALRM) { 393 if (signo == SIGALRM) {
395 printf (_("%s - Plugin timed out after %d seconds\n"), 394 printf (_("%s - Plugin timed out after %d seconds\n"),
396 state_text(timeout_state), timeout_interval); 395 state_text(timeout_state), timeout_interval);
397 396
398 long maxfd = mp_open_max(); 397 long maxfd = mp_open_max();
399 if(_cmd_pids) for(i = 0; i < maxfd; i++) { 398 if(_cmd_pids) for(long int i = 0; i < maxfd; i++) {
400 if(_cmd_pids[i] != 0) kill(_cmd_pids[i], SIGKILL); 399 if(_cmd_pids[i] != 0) kill(_cmd_pids[i], SIGKILL);
401 } 400 }
402 401