summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-18 14:40:51 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-18 14:40:51 (GMT)
commit0b389d636e6c560f2ac22f27db6d18ebb09b474e (patch)
tree4b57e055e4c21ff3769302accdb8b4cc17fea112 /plugins
parent45893377bd70fd93928d015dc1f20cd19a17c6d3 (diff)
downloadmonitoring-plugins-0b389d636e6c560f2ac22f27db6d18ebb09b474e.tar.gz
check_mysql: Use C99 booleans
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_mysql.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 7d85554..6a7daf1 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -113,7 +113,7 @@ main (int argc, char **argv)
113 char slaveresult[SLAVERESULTSIZE] = { 0 }; 113 char slaveresult[SLAVERESULTSIZE] = { 0 };
114 char* perf; 114 char* perf;
115 115
116 perf = strdup (""); 116 perf = strdup ("");
117 117
118 setlocale (LC_ALL, ""); 118 setlocale (LC_ALL, "");
119 bindtextdomain (PACKAGE, LOCALEDIR); 119 bindtextdomain (PACKAGE, LOCALEDIR);
@@ -193,14 +193,14 @@ main (int argc, char **argv)
193 for(i = 0; i < LENGTH_METRIC_UNIT; i++) { 193 for(i = 0; i < LENGTH_METRIC_UNIT; i++) {
194 if (strcmp(row[0], metric_unit[i]) == 0) { 194 if (strcmp(row[0], metric_unit[i]) == 0) {
195 xasprintf(&perf, "%s%s ", perf, perfdata(metric_unit[i], 195 xasprintf(&perf, "%s%s ", perf, perfdata(metric_unit[i],
196 atol(row[1]), "", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0)); 196 atol(row[1]), "", false, 0, false, 0, false, 0, false, 0));
197 continue; 197 continue;
198 } 198 }
199 } 199 }
200 for(i = 0; i < LENGTH_METRIC_COUNTER; i++) { 200 for(i = 0; i < LENGTH_METRIC_COUNTER; i++) {
201 if (strcmp(row[0], metric_counter[i]) == 0) { 201 if (strcmp(row[0], metric_counter[i]) == 0) {
202 xasprintf(&perf, "%s%s ", perf, perfdata(metric_counter[i], 202 xasprintf(&perf, "%s%s ", perf, perfdata(metric_counter[i],
203 atol(row[1]), "c", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0)); 203 atol(row[1]), "c", false, 0, false, 0, false, 0, false, 0));
204 continue; 204 continue;
205 } 205 }
206 } 206 }
@@ -322,10 +322,10 @@ main (int argc, char **argv)
322 status = get_status(value, my_threshold); 322 status = get_status(value, my_threshold);
323 323
324 xasprintf (&perf, "%s %s", perf, fperfdata ("seconds behind master", value, "s", 324 xasprintf (&perf, "%s %s", perf, fperfdata ("seconds behind master", value, "s",
325 TRUE, (double) warning_time, 325 true, (double) warning_time,
326 TRUE, (double) critical_time, 326 true, (double) critical_time,
327 FALSE, 0, 327 false, 0,
328 FALSE, 0)); 328 false, 0));
329 329
330 if (status == STATE_WARNING) { 330 if (status == STATE_WARNING) {
331 printf("SLOW_SLAVE %s: %s|%s\n", _("WARNING"), slaveresult, perf); 331 printf("SLOW_SLAVE %s: %s|%s\n", _("WARNING"), slaveresult, perf);