diff mbox series

[4/6] checkpolicy: drop never read member

Message ID 20240402152925.99781-4-cgoettsche@seltendoof.de (mailing list archive)
State Accepted
Commit 08e55dfffe67
Delegated to: Petr Lautrbach
Headers show
Series [1/6] checkpolicy: include <ctype.h> for isprint(3) | expand

Commit Message

Christian Göttsche April 2, 2024, 3:29 p.m. UTC
From: Christian Göttsche <cgzones@googlemail.com>

The struct scope_stack member child is never read, drop it.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 checkpolicy/module_compiler.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/checkpolicy/module_compiler.c b/checkpolicy/module_compiler.c
index 6ff91b8f..e25a77b4 100644
--- a/checkpolicy/module_compiler.c
+++ b/checkpolicy/module_compiler.c
@@ -34,7 +34,7 @@  typedef struct scope_stack {
 	avrule_t *last_avrule;
 	int in_else;		/* if in an avrule block, within ELSE branch */
 	int require_given;	/* 1 if this block had at least one require */
-	struct scope_stack *parent, *child;
+	struct scope_stack *parent;
 } scope_stack_t;
 
 extern policydb_t *policydbp;
@@ -1478,7 +1478,6 @@  static int push_stack(int stack_type, ...)
 	}
 	va_end(ap);
 	s->parent = stack_top;
-	s->child = NULL;
 	stack_top = s;
 	return 0;
 }
@@ -1490,9 +1489,6 @@  static void pop_stack(void)
 	scope_stack_t *parent;
 	assert(stack_top != NULL);
 	parent = stack_top->parent;
-	if (parent != NULL) {
-		parent->child = NULL;
-	}
 	free(stack_top);
 	stack_top = parent;
 }