Blame SOURCES/0002-getcifsacl-remove-some-dead-code.patch

97823b
From 930b724e784c28bd1b3024f7fc6ca24cdac82a4d Mon Sep 17 00:00:00 2001
97823b
From: Jeff Layton <jlayton@samba.org>
97823b
Date: Wed, 9 Oct 2013 08:14:21 -0400
97823b
Subject: [PATCH] getcifsacl: remove some dead code
97823b
97823b
Coverity says:
97823b
97823b
Error: DEADCODE (CWE-561): [#def5]
97823b
cifs-utils-6.2/getcifsacl.c:101: assignment: Assigning: "mflags" = "false".
97823b
cifs-utils-6.2/getcifsacl.c:109: const: At condition "mflags", the value of "mflags" must be equal to 0.
97823b
cifs-utils-6.2/getcifsacl.c:109: dead_error_condition: The condition "mflags" cannot be true.
97823b
cifs-utils-6.2/getcifsacl.c:110: dead_error_line: Execution cannot reach this statement "printf("|");".
97823b
97823b
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
97823b
Signed-off-by: Jeff Layton <jlayton@samba.org>
97823b
---
97823b
 getcifsacl.c | 5 +----
97823b
 1 file changed, 1 insertion(+), 4 deletions(-)
97823b
97823b
diff --git a/getcifsacl.c b/getcifsacl.c
97823b
index 33f36b4..f08cdea 100644
97823b
--- a/getcifsacl.c
97823b
+++ b/getcifsacl.c
97823b
@@ -106,10 +106,7 @@ print_ace_flags(uint8_t flags, int raw)
97823b
 	}
97823b
 
97823b
 	if (flags & OBJECT_INHERIT_FLAG) {
97823b
-		if (mflags)
97823b
-			printf("|");
97823b
-		else
97823b
-			mflags = true;
97823b
+		mflags = true;
97823b
 		printf("OI");
97823b
 	}
97823b
 	if (flags & CONTAINER_INHERIT_FLAG) {
97823b
-- 
97823b
1.8.3.1
97823b