diff mbox series

[v2,2/6] checkpolicy: update cond_expr_t struct member name

Message ID 20230420153556.32115-2-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 513fc1570c16
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
The previous commit changed the member `bool` to `boolean` of the
libsepol type `cond_expr_t` for C23 compatibility.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
v2:
   update commit description
---
 checkpolicy/checkpolicy.c   | 2 +-
 checkpolicy/policy_define.c | 2 +-
 checkpolicy/test/dismod.c   | 2 +-
 checkpolicy/test/dispol.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/checkpolicy/checkpolicy.c b/checkpolicy/checkpolicy.c
index 48c31261..b0c36807 100644
--- a/checkpolicy/checkpolicy.c
+++ b/checkpolicy/checkpolicy.c
@@ -313,7 +313,7 @@  static void display_expr(const cond_expr_t * exp)
 		switch (cur->expr_type) {
 		case COND_BOOL:
 			printf("%s ",
-			       policydbp->p_bool_val_to_name[cur->bool - 1]);
+			       policydbp->p_bool_val_to_name[cur->boolean - 1]);
 			break;
 		case COND_NOT:
 			printf("! ");
diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index f277e600..d4e376ad 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -4159,7 +4159,7 @@  cond_expr_t *define_cond_expr(uint32_t expr_type, void *arg1, void *arg2)
 			free(id);
 			return NULL;
 		}
-		expr->bool = bool_var->s.value;
+		expr->boolean = bool_var->s.value;
 		free(id);
 		return expr;
 	default:
diff --git a/checkpolicy/test/dismod.c b/checkpolicy/test/dismod.c
index a2d74d42..bda8d4e9 100644
--- a/checkpolicy/test/dismod.c
+++ b/checkpolicy/test/dismod.c
@@ -404,7 +404,7 @@  static void display_expr(policydb_t * p, cond_expr_t * exp, FILE * fp)
 		switch (cur->expr_type) {
 		case COND_BOOL:
 			fprintf(fp, "%s ",
-				p->p_bool_val_to_name[cur->bool - 1]);
+				p->p_bool_val_to_name[cur->boolean - 1]);
 			break;
 		case COND_NOT:
 			fprintf(fp, "! ");
diff --git a/checkpolicy/test/dispol.c b/checkpolicy/test/dispol.c
index 36a3362c..6561366d 100644
--- a/checkpolicy/test/dispol.c
+++ b/checkpolicy/test/dispol.c
@@ -197,7 +197,7 @@  static void display_expr(policydb_t * p, cond_expr_t * exp, FILE * fp)
 		switch (cur->expr_type) {
 		case COND_BOOL:
 			fprintf(fp, "%s ",
-				p->p_bool_val_to_name[cur->bool - 1]);
+				p->p_bool_val_to_name[cur->boolean - 1]);
 			break;
 		case COND_NOT:
 			fprintf(fp, "! ");