diff mbox series

[v2,4/6] checkpolicy: rename bool identifiers

Message ID 20230420153556.32115-4-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit d213d80f56b4
Delegated to: Petr Lautrbach
Headers show
Series [v2,1/6] libsepol: rename struct member | expand

Commit Message

Christian Göttsche April 20, 2023, 3:35 p.m. UTC
Avoid using the identifier `bool` to improve support with future C
standards.  C23 is about to make `bool` a predefined macro (see N2654).

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 checkpolicy/checkpolicy.c | 8 ++++----
 checkpolicy/test/dismod.c | 8 ++++----
 checkpolicy/test/dispol.c | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/checkpolicy/checkpolicy.c b/checkpolicy/checkpolicy.c
index b0c36807..2485142d 100644
--- a/checkpolicy/checkpolicy.c
+++ b/checkpolicy/checkpolicy.c
@@ -354,14 +354,14 @@  static int display_cond_expressions(void)
 
 static int change_bool(const char *name, int state)
 {
-	cond_bool_datum_t *bool;
+	cond_bool_datum_t *boolean;
 
-	bool = hashtab_search(policydbp->p_bools.table, name);
-	if (bool == NULL) {
+	boolean = hashtab_search(policydbp->p_bools.table, name);
+	if (boolean == NULL) {
 		printf("Could not find bool %s\n", name);
 		return -1;
 	}
-	bool->state = state;
+	boolean->state = state;
 	evaluate_conds(policydbp);
 	return 0;
 }
diff --git a/checkpolicy/test/dismod.c b/checkpolicy/test/dismod.c
index bda8d4e9..929ee308 100644
--- a/checkpolicy/test/dismod.c
+++ b/checkpolicy/test/dismod.c
@@ -602,14 +602,14 @@  int display_cond_expressions(policydb_t * p, FILE * fp)
 
 int change_bool(char *name, int state, policydb_t * p, FILE * fp)
 {
-	cond_bool_datum_t *bool;
+	cond_bool_datum_t *boolean;
 
-	bool = hashtab_search(p->p_bools.table, name);
-	if (bool == NULL) {
+	boolean = hashtab_search(p->p_bools.table, name);
+	if (boolean == NULL) {
 		fprintf(fp, "Could not find bool %s\n", name);
 		return -1;
 	}
-	bool->state = state;
+	boolean->state = state;
 	evaluate_conds(p);
 	return 0;
 }
diff --git a/checkpolicy/test/dispol.c b/checkpolicy/test/dispol.c
index 6561366d..9ab6533f 100644
--- a/checkpolicy/test/dispol.c
+++ b/checkpolicy/test/dispol.c
@@ -262,14 +262,14 @@  static int display_handle_unknown(policydb_t * p, FILE * out_fp)
 
 static int change_bool(char *name, int state, policydb_t * p, FILE * fp)
 {
-	cond_bool_datum_t *bool;
+	cond_bool_datum_t *boolean;
 
-	bool = hashtab_search(p->p_bools.table, name);
-	if (bool == NULL) {
+	boolean = hashtab_search(p->p_bools.table, name);
+	if (boolean == NULL) {
 		fprintf(fp, "Could not find bool %s\n", name);
 		return -1;
 	}
-	bool->state = state;
+	boolean->state = state;
 	evaluate_conds(p);
 	return 0;
 }