[Nagiosplug-checkins] nagiosplug/lib utils_base.c,1.3,1.4

Holger Weiss hweiss at users.sourceforge.net
Sat Jan 27 18:49:11 CET 2007


Update of /cvsroot/nagiosplug/nagiosplug/lib
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16339

Modified Files:
	utils_base.c 
Log Message:
Change the variable names `true' and `false' (which are keywords in C99)
to `yes' and `no'.  Fixes compilation when using SGI's MIPSpro c99(1).


Index: utils_base.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/lib/utils_base.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- utils_base.c	18 Oct 2006 12:03:10 -0000	1.3
+++ utils_base.c	27 Jan 2007 17:49:08 -0000	1.4
@@ -151,34 +151,34 @@
 int
 check_range(double value, range *my_range)
 {
-	int false = FALSE;
-	int true = TRUE;
+	int no = FALSE;
+	int yes = TRUE;
 	
 	if (my_range->alert_on == INSIDE) {
-		false = TRUE;
-		true = FALSE;
+		no = TRUE;
+		yes = FALSE;
 	}
 
 	if (my_range->end_infinity == FALSE && my_range->start_infinity == FALSE) {
 		if ((my_range->start <= value) && (value <= my_range->end)) {
-			return false;
+			return no;
 		} else {
-			return true;
+			return yes;
 		}
 	} else if (my_range->start_infinity == FALSE && my_range->end_infinity == TRUE) {
 		if (my_range->start <= value) {
-			return false;
+			return no;
 		} else {
-			return true;
+			return yes;
 		}
 	} else if (my_range->start_infinity == TRUE && my_range->end_infinity == FALSE) {
 		if (value <= my_range->end) {
-			return false;
+			return no;
 		} else {
-			return true;
+			return yes;
 		}
 	} else {
-		return false;
+		return no;
 	}
 }
 





More information about the Commits mailing list