diff options
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r-- | plugins/check_snmp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 68ffaf55..2e2430da 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -361,7 +361,7 @@ main (int argc, char **argv) | |||
361 | eval_method[i] & WARN_NE) { | 361 | eval_method[i] & WARN_NE) { |
362 | p2 = strpbrk (p2, "0123456789"); | 362 | p2 = strpbrk (p2, "0123456789"); |
363 | if (p2 == NULL) | 363 | if (p2 == NULL) |
364 | terminate (STATE_UNKNOWN,"No valid data returned"); | 364 | die (STATE_UNKNOWN,"No valid data returned"); |
365 | response_value[i] = strtoul (p2, NULL, 10); | 365 | response_value[i] = strtoul (p2, NULL, 10); |
366 | iresult = check_num (i); | 366 | iresult = check_num (i); |
367 | asprintf (&show, "%lu", response_value[i]); | 367 | asprintf (&show, "%lu", response_value[i]); |
@@ -427,7 +427,7 @@ main (int argc, char **argv) | |||
427 | } /* end while (ptr) */ | 427 | } /* end while (ptr) */ |
428 | 428 | ||
429 | if (found == 0) | 429 | if (found == 0) |
430 | terminate | 430 | die |
431 | (STATE_UNKNOWN, | 431 | (STATE_UNKNOWN, |
432 | _("%s problem - No data recieved from host\nCMD: %s\n"), | 432 | _("%s problem - No data recieved from host\nCMD: %s\n"), |
433 | label, command_line); | 433 | label, command_line); |
@@ -643,7 +643,7 @@ process_arguments (int argc, char **argv) | |||
643 | labels_size += 8; | 643 | labels_size += 8; |
644 | labels = realloc (labels, labels_size); | 644 | labels = realloc (labels, labels_size); |
645 | if (labels == NULL) | 645 | if (labels == NULL) |
646 | terminate (STATE_UNKNOWN, | 646 | die (STATE_UNKNOWN, |
647 | _("Could not realloc() labels[%d]"), nlabels); | 647 | _("Could not realloc() labels[%d]"), nlabels); |
648 | } | 648 | } |
649 | labels[nlabels - 1] = optarg; | 649 | labels[nlabels - 1] = optarg; |
@@ -657,7 +657,7 @@ process_arguments (int argc, char **argv) | |||
657 | labels_size += 8; | 657 | labels_size += 8; |
658 | labels = realloc (labels, labels_size); | 658 | labels = realloc (labels, labels_size); |
659 | if (labels == NULL) | 659 | if (labels == NULL) |
660 | terminate (STATE_UNKNOWN, _("Could not realloc() labels\n")); | 660 | die (STATE_UNKNOWN, _("Could not realloc() labels\n")); |
661 | } | 661 | } |
662 | labels++; | 662 | labels++; |
663 | ptr = thisarg (ptr); | 663 | ptr = thisarg (ptr); |
@@ -674,7 +674,7 @@ process_arguments (int argc, char **argv) | |||
674 | unitv_size += 8; | 674 | unitv_size += 8; |
675 | unitv = realloc (unitv, unitv_size); | 675 | unitv = realloc (unitv, unitv_size); |
676 | if (unitv == NULL) | 676 | if (unitv == NULL) |
677 | terminate (STATE_UNKNOWN, | 677 | die (STATE_UNKNOWN, |
678 | _("Could not realloc() units [%d]\n"), nunits); | 678 | _("Could not realloc() units [%d]\n"), nunits); |
679 | } | 679 | } |
680 | unitv[nunits - 1] = optarg; | 680 | unitv[nunits - 1] = optarg; |
@@ -688,7 +688,7 @@ process_arguments (int argc, char **argv) | |||
688 | unitv_size += 8; | 688 | unitv_size += 8; |
689 | unitv = realloc (unitv, unitv_size); | 689 | unitv = realloc (unitv, unitv_size); |
690 | if (units == NULL) | 690 | if (units == NULL) |
691 | terminate (STATE_UNKNOWN, _("Could not realloc() units\n")); | 691 | die (STATE_UNKNOWN, _("Could not realloc() units\n")); |
692 | } | 692 | } |
693 | nunits++; | 693 | nunits++; |
694 | ptr = thisarg (ptr); | 694 | ptr = thisarg (ptr); |
@@ -905,7 +905,7 @@ thisarg (char *str) | |||
905 | str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ | 905 | str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ |
906 | if (strstr (str, "'") == str) { /* handle SIMPLE quoted strings */ | 906 | if (strstr (str, "'") == str) { /* handle SIMPLE quoted strings */ |
907 | if (strlen (str) == 1 || !strstr (str + 1, "'")) | 907 | if (strlen (str) == 1 || !strstr (str + 1, "'")) |
908 | terminate (STATE_UNKNOWN, "Unbalanced quotes\n"); | 908 | die (STATE_UNKNOWN, "Unbalanced quotes\n"); |
909 | } | 909 | } |
910 | return str; | 910 | return str; |
911 | } | 911 | } |