Browse Source

carrierroute: rename boolean type conflicting with clang sdtbool

In file included from carrierroute.c:51:
./cr_db.h:92:2: error: expected identifier
        false = 0,
        ^
/usr/lib/clang/9.1.0/include/stdbool.h:33:15: note: expanded from
      macro 'false'
 #define false 0

(cherry picked from commit 0a14914fc1f98c18b9b75f66fe2e71f15147c9bf)
(cherry picked from commit 9aee0374e1db8733a220d37fbc53517353aee4dd)
Daniel-Constantin Mierla 7 years ago
parent
commit
968b32c759
2 changed files with 5 additions and 5 deletions
  1. 2 2
      src/modules/carrierroute/cr_db.c
  2. 3 3
      src/modules/carrierroute/cr_db.h

+ 2 - 2
src/modules/carrierroute/cr_db.c

@@ -351,7 +351,7 @@ int load_route_data_db(struct route_data_t * rd) {
 		}
 	}
 	int n = 0;
-	boolean query_done = false;
+	crboolean query_done = crfalse;
 	do {
 		LM_DBG("loading, cycle %d", n++);
 		for (i = 0; i < RES_ROW_N(res); ++i) {
@@ -419,7 +419,7 @@ int load_route_data_db(struct route_data_t * rd) {
 				}
 				if(RES_ROW_N(prob_res) == 0) {
 					LM_ERR("Carrierroute db table contains route(s) with only 0 probability.\n");
-					query_done = true;
+					query_done = crtrue;
 				}
 				carrierroute_dbf.free_result(carrierroute_dbh, prob_res);
 				prob_res = NULL;

+ 3 - 3
src/modules/carrierroute/cr_db.h

@@ -89,8 +89,8 @@ int load_route_data_db (struct route_data_t * rd);
 int load_user_carrier(str * user, str * domain);
 
 typedef enum {
-	false = 0,
-	true = 1
-} boolean;
+	crfalse = 0,
+	crtrue = 1
+} crboolean;
 
 #endif