[apparmor] [patch] parser: eliminate redundant/dead code
Steve Beattie
steve at nxnw.org
Fri Mar 18 17:48:01 UTC 2016
The debugging code for profile entries contains a check to ensure that
it's not NULL, but the list iterator macro already ensures that the
iteration will stop if the item is NULL, making the check redundant.
Coverity CID #55983
Signed-off-by: Steve Beattie <steve at nxnw.org>
---
parser/parser_misc.c | 4 ----
1 file changed, 4 deletions(-)
Index: b/parser/parser_misc.c
===================================================================
--- a/parser/parser_misc.c
+++ b/parser/parser_misc.c
@@ -665,9 +665,6 @@ void debug_cod_entries(struct cod_entry
printf("--- Entries ---\n");
list_for_each(list, item) {
- if (!item)
- printf("Item is NULL!\n");
-
printf("Mode:\t");
if (HAS_CHANGE_PROFILE(item->mode))
printf(" change_profile");
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160318/2e5b3dc1/attachment.pgp>
More information about the AppArmor
mailing list