lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 23 Mar 2016 08:20:14 +0100 (CET)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Daniel Rosenberg <drosen@...gle.com>
cc:	kbuild-all@...org, Daniel Campello <campello@...gle.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] sdcardfs: fix itnull.cocci warnings

Remove NULL tests, as the index variable of list_for_each_entry cannot be 
NULL.

Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---

The code seems to have a lot of unnecessary braces as well.

tree:   https://android.googlesource.com/kernel/common android-4.4
head:   f06e869f936e548fd3fd78ddcbebe171f0defadb
commit: 1e2d3bbcf3f5a603e62dfa0514a43e13ee679d4f [4/6] sdcardfs: Bring up 
to date with Android M permissions:

 packagelist.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/sdcardfs/packagelist.c
+++ b/fs/sdcardfs/packagelist.c
@@ -160,7 +160,7 @@ static int insert_str_to_int(struct pack
 	mutex_unlock(&pkgl_dat->hashtable_lock);
 
 	list_for_each_entry(sbinfo, &sdcardfs_super_list, list) {
-		if (sbinfo) {
+		{
 			fixup_perms(sbinfo->sb);
 		}
 	}
@@ -189,7 +189,7 @@ static void remove_str_to_int(struct pac
 	}
 	mutex_unlock(&pkgl_dat->hashtable_lock);
 	list_for_each_entry(sbinfo, &sdcardfs_super_list, list) {
-		if (sbinfo) {
+		{
 			fixup_perms(sbinfo->sb);
 		}
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ