summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/utils_disk.c4
-rw-r--r--lib/utils_tcp.c6
-rw-r--r--plugins/check_disk.c18
3 files changed, 14 insertions, 14 deletions
diff --git a/lib/utils_disk.c b/lib/utils_disk.c
index 3f9c8a9..9324f5f 100644
--- a/lib/utils_disk.c
+++ b/lib/utils_disk.c
@@ -181,9 +181,9 @@ np_regex_match_mount_entry (struct mount_entry* me, regex_t* re)
181{ 181{
182 if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 || 182 if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 ||
183 regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) { 183 regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) {
184 return true; 184 return TRUE;
185 } else { 185 } else {
186 return false; 186 return FALSE;
187 } 187 }
188} 188}
189 189
diff --git a/lib/utils_tcp.c b/lib/utils_tcp.c
index b707519..2fefaf3 100644
--- a/lib/utils_tcp.c
+++ b/lib/utils_tcp.c
@@ -52,9 +52,9 @@ np_expect_match(char* status, char** server_expect, int expect_count, int all, i
52 } else 52 } else
53 if(verbose) puts("couldn't find it"); 53 if(verbose) puts("couldn't find it");
54 } 54 }
55 if ((all == true && match == expect_count) || 55 if ((all == TRUE && match == expect_count) ||
56 (! all && match >= 1)) { 56 (! all && match >= 1)) {
57 return true; 57 return TRUE;
58 } else 58 } else
59 return false; 59 return FALSE;
60} 60}
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index d267409..088c589 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -150,7 +150,7 @@ char *warn_usedinodes_percent = NULL;
150char *crit_usedinodes_percent = NULL; 150char *crit_usedinodes_percent = NULL;
151char *warn_freeinodes_percent = NULL; 151char *warn_freeinodes_percent = NULL;
152char *crit_freeinodes_percent = NULL; 152char *crit_freeinodes_percent = NULL;
153bool path_selected = false; 153int path_selected = FALSE;
154char *group = NULL; 154char *group = NULL;
155 155
156 156
@@ -195,7 +195,7 @@ main (int argc, char **argv)
195 /* If a list of paths has not been selected, find entire 195 /* If a list of paths has not been selected, find entire
196 mount list and create list of paths 196 mount list and create list of paths
197 */ 197 */
198 if (path_selected == false) { 198 if (path_selected == FALSE) {
199 for (me = mount_list; me; me = me->me_next) { 199 for (me = mount_list; me; me = me->me_next) {
200 if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) { 200 if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) {
201 path = np_add_parameter(&path_select_list, me->me_mountdir); 201 path = np_add_parameter(&path_select_list, me->me_mountdir);
@@ -626,7 +626,7 @@ process_arguments (int argc, char **argv)
626 se->group = group; 626 se->group = group;
627 set_all_thresholds(se); 627 set_all_thresholds(se);
628 np_set_best_match(se, mount_list, exact_match); 628 np_set_best_match(se, mount_list, exact_match);
629 path_selected = true; 629 path_selected = TRUE;
630 break; 630 break;
631 case 'x': /* exclude path or partition */ 631 case 'x': /* exclude path or partition */
632 np_add_name(&dp_exclude_list, optarg); 632 np_add_name(&dp_exclude_list, optarg);
@@ -713,7 +713,7 @@ process_arguments (int argc, char **argv)
713 713
714 for (me = mount_list; me; me = me->me_next) { 714 for (me = mount_list; me; me = me->me_next) {
715 if (np_regex_match_mount_entry(me, &re)) { 715 if (np_regex_match_mount_entry(me, &re)) {
716 fnd = true; 716 fnd = TRUE;
717 if (verbose > 3) 717 if (verbose > 3)
718 printf("%s %s matching expression %s\n", me->me_devname, me->me_mountdir, optarg); 718 printf("%s %s matching expression %s\n", me->me_devname, me->me_mountdir, optarg);
719 719
@@ -730,8 +730,8 @@ process_arguments (int argc, char **argv)
730 die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), 730 die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"),
731 _("Regular expression did not match any path or disk"), optarg); 731 _("Regular expression did not match any path or disk"), optarg);
732 732
733 fnd = false; 733 fnd = FALSE;
734 path_selected = true; 734 path_selected = TRUE;
735 np_set_best_match(path_select_list, mount_list, exact_match); 735 np_set_best_match(path_select_list, mount_list, exact_match);
736 cflags = default_cflags; 736 cflags = default_cflags;
737 737
@@ -741,7 +741,7 @@ process_arguments (int argc, char **argv)
741 break; 741 break;
742 case 'C': 742 case 'C':
743 /* add all mount entries to path_select list if no partitions have been explicitly defined using -p */ 743 /* add all mount entries to path_select list if no partitions have been explicitly defined using -p */
744 if (path_selected == false) { 744 if (path_selected == FALSE) {
745 struct mount_entry *me; 745 struct mount_entry *me;
746 struct parameter_list *path; 746 struct parameter_list *path;
747 for (me = mount_list; me; me = me->me_next) { 747 for (me = mount_list; me; me = me->me_next) {
@@ -765,7 +765,7 @@ process_arguments (int argc, char **argv)
765 warn_freeinodes_percent = NULL; 765 warn_freeinodes_percent = NULL;
766 crit_freeinodes_percent = NULL; 766 crit_freeinodes_percent = NULL;
767 767
768 path_selected = false; 768 path_selected = FALSE;
769 group = NULL; 769 group = NULL;
770 break; 770 break;
771 case 'V': /* version */ 771 case 'V': /* version */
@@ -789,7 +789,7 @@ process_arguments (int argc, char **argv)
789 789
790 if (argc > c && path == NULL) { 790 if (argc > c && path == NULL) {
791 se = np_add_parameter(&path_select_list, strdup(argv[c++])); 791 se = np_add_parameter(&path_select_list, strdup(argv[c++]));
792 path_selected = true; 792 path_selected = TRUE;
793 set_all_thresholds(se); 793 set_all_thresholds(se);
794 } 794 }
795 795