diff mbox series

[05/47] libsemanage: drop dead variable

Message ID 20241111141706.38039-5-cgoettsche@seltendoof.de (mailing list archive)
State New
Delegated to: Petr Lautrbach
Headers show
Series [01/47] libsemanage: white space cleanup | expand

Commit Message

Christian Göttsche Nov. 11, 2024, 2:16 p.m. UTC
From: Christian Göttsche <cgzones@googlemail.com>

Reported by clang-analyzer:

    semanage_store.c:2206:9: warning: Although the value stored to 'retval' is used in the enclosing expression, the value is never actually read from 'retval' [deadcode.DeadStores]
                            if ((retval =
                                 ^

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsemanage/src/semanage_store.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
index 82c5a684..57295482 100644
--- a/libsemanage/src/semanage_store.c
+++ b/libsemanage/src/semanage_store.c
@@ -2201,7 +2201,7 @@  int semanage_write_policydb(semanage_handle_t * sh, sepol_policydb_t * out,
 int semanage_verify_modules(semanage_handle_t * sh,
 			    char **module_filenames, int num_modules)
 {
-	int i, retval;
+	int i;
 	semanage_conf_t *conf = sh->conf;
 	if (conf->mod_prog == NULL) {
 		return 0;
@@ -2210,8 +2210,7 @@  int semanage_verify_modules(semanage_handle_t * sh,
 		char *module = module_filenames[i];
 		external_prog_t *e;
 		for (e = conf->mod_prog; e != NULL; e = e->next) {
-			if ((retval =
-			     semanage_exec_prog(sh, e, module, "$<")) != 0) {
+			if (semanage_exec_prog(sh, e, module, "$<") != 0) {
 				return -1;
 			}
 		}