SF.net SVN: nagiosplug: [1787] nagiosplug/trunk

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 1787
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1787&view=rev
Author:   psychotrahe
Date:     2007-09-22 10:48:33 -0700 (Sat, 22 Sep 2007)

Log Message:
-----------
substituted bool/true/false with int/TRUE/FALSE (discussed on np-devel)

Modified Paths:
--------------
    nagiosplug/trunk/lib/utils_disk.c
    nagiosplug/trunk/lib/utils_tcp.c
    nagiosplug/trunk/plugins/check_disk.c

Modified: nagiosplug/trunk/lib/utils_disk.c
===================================================================
--- nagiosplug/trunk/lib/utils_disk.c	2007-09-22 17:40:35 UTC (rev 1786)
+++ nagiosplug/trunk/lib/utils_disk.c	2007-09-22 17:48:33 UTC (rev 1787)
@@ -181,9 +181,9 @@
 {
   if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 ||
       regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) {
-    return true;
+    return TRUE;
   } else {
-    return false;
+    return FALSE;
   }
 }
 

Modified: nagiosplug/trunk/lib/utils_tcp.c
===================================================================
--- nagiosplug/trunk/lib/utils_tcp.c	2007-09-22 17:40:35 UTC (rev 1786)
+++ nagiosplug/trunk/lib/utils_tcp.c	2007-09-22 17:48:33 UTC (rev 1787)
@@ -52,9 +52,9 @@
 		} else
 			if(verbose) puts("couldn't find it");
 	}
-	if ((all == true && match == expect_count) ||
+	if ((all == TRUE && match == expect_count) ||
 		(! all && match >= 1)) {
-		return true;
+		return TRUE;
 	} else
-		return false;
+		return FALSE;
 }

Modified: nagiosplug/trunk/plugins/check_disk.c
===================================================================
--- nagiosplug/trunk/plugins/check_disk.c	2007-09-22 17:40:35 UTC (rev 1786)
+++ nagiosplug/trunk/plugins/check_disk.c	2007-09-22 17:48:33 UTC (rev 1787)
@@ -150,7 +150,7 @@
 char *crit_usedinodes_percent = NULL;
 char *warn_freeinodes_percent = NULL;
 char *crit_freeinodes_percent = NULL;
-bool path_selected = false;
+int path_selected = FALSE;
 char *group = NULL;
 
 
@@ -195,7 +195,7 @@
   /* If a list of paths has not been selected, find entire
      mount list and create list of paths
    */
-  if (path_selected == false) { 
+  if (path_selected == FALSE) { 
     for (me = mount_list; me; me = me->me_next) {
       if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) {
         path = np_add_parameter(&path_select_list, me->me_mountdir);
@@ -626,7 +626,7 @@
       se->group = group;
       set_all_thresholds(se);
       np_set_best_match(se, mount_list, exact_match);
-      path_selected = true;
+      path_selected = TRUE;
       break;
     case 'x':                 /* exclude path or partition */
       np_add_name(&dp_exclude_list, optarg);
@@ -713,7 +713,7 @@
           
       for (me = mount_list; me; me = me->me_next) {
         if (np_regex_match_mount_entry(me, &re)) {
-          fnd = true;
+          fnd = TRUE;
           if (verbose > 3)
             printf("%s %s matching expression %s\n", me->me_devname, me->me_mountdir, optarg);
 
@@ -730,8 +730,8 @@
         die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"),
             _("Regular expression did not match any path or disk"), optarg);
 
-      fnd = false;
-      path_selected = true;
+      fnd = FALSE;
+      path_selected = TRUE;
       np_set_best_match(path_select_list, mount_list, exact_match);
       cflags = default_cflags;
 
@@ -741,7 +741,7 @@
       break;
     case 'C':
        /* add all mount entries to path_select list if no partitions have been explicitly defined using -p */
-       if (path_selected == false) {
+       if (path_selected == FALSE) {
          struct mount_entry *me;
          struct parameter_list *path;
          for (me = mount_list; me; me = me->me_next) {
@@ -765,7 +765,7 @@
       warn_freeinodes_percent = NULL;
       crit_freeinodes_percent = NULL;
     
-      path_selected = false;
+      path_selected = FALSE;
       group = NULL;
       break;
     case 'V':                 /* version */
@@ -789,7 +789,7 @@
 
   if (argc > c && path == NULL) {
     se = np_add_parameter(&path_select_list, strdup(argv[c++]));
-    path_selected = true;
+    path_selected = TRUE;
     set_all_thresholds(se);
   }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.