summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 12:56:02 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 12:56:02 +0100
commit1868ea77253c7379e46b50d0f4513d86435bc737 (patch)
tree4baca465d89dded38d45afd2bde89e86b33b7f84 /plugins
parentce538b0dd9140fee6a961f35b5b6e2576304bad4 (diff)
downloadmonitoring-plugins-1868ea77253c7379e46b50d0f4513d86435bc737.tar.gz
check_nagios: linter fixes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_nagios.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index 6a689847..48629be3 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -71,11 +71,13 @@ int main(int argc, char **argv) {
71#endif /* PS_USES_PROCETIME */ 71#endif /* PS_USES_PROCETIME */
72 char procprog[MAX_INPUT_BUFFER]; 72 char procprog[MAX_INPUT_BUFFER];
73 char *procargs; 73 char *procargs;
74 int pos, cols; 74 int pos;
75 int cols;
75 int expected_cols = PS_COLS - 1; 76 int expected_cols = PS_COLS - 1;
76 const char *zombie = "Z"; 77 const char *zombie = "Z";
77 char *temp_string; 78 char *temp_string;
78 output chld_out, chld_err; 79 output chld_out;
80 output chld_err;
79 size_t i; 81 size_t i;
80 82
81 setlocale(LC_ALL, ""); 83 setlocale(LC_ALL, "");
@@ -108,7 +110,8 @@ int main(int argc, char **argv) {
108 temp_entry_time = strtoul(temp_ptr + 8, NULL, 10); 110 temp_entry_time = strtoul(temp_ptr + 8, NULL, 10);
109 latest_entry_time = temp_entry_time; 111 latest_entry_time = temp_entry_time;
110 break; 112 break;
111 } else if ((temp_ptr = strtok(input_buffer, "]")) != NULL) { 113 }
114 if ((temp_ptr = strtok(input_buffer, "]")) != NULL) {
112 temp_entry_time = strtoul(temp_ptr + 1, NULL, 10); 115 temp_entry_time = strtoul(temp_ptr + 1, NULL, 10);
113 if (temp_entry_time > latest_entry_time) 116 if (temp_entry_time > latest_entry_time)
114 latest_entry_time = temp_entry_time; 117 latest_entry_time = temp_entry_time;