Skip to contentSkip to conversation

selinux: type_bounds_sanity_check has a meaningless variable declaration

PATCH In review Eric Paris 3 participants 3 messages Aug 3, 2010 – Aug 16, 2010 SELinux security module

lore
Share & tools
lore

Eric Paris

author
#0 lore raw

PATCH 1/1 selinux: type_bounds_sanity_check has a meaningless variable declaration

type is not used at all, stop declaring and assigning it.

---

 security/selinux/ss/policydb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
security/selinux/ss/policydb.c +2 -2
index b7ef93e..3ff0c24 100644
@@ -1606,11 +1606,11 @@ static int role_bounds_sanity_check(void *key, void *datum, void *datap)
 
 static int type_bounds_sanity_check(void *key, void *datum, void *datap)
 {
-	struct type_datum *upper, *type;
+	struct type_datum *upper;
 	struct policydb *p = datap;
 	int depth = 0;
 
-	upper = type = datum;
+	upper = datum;
 	while (upper->bounds) {
 		if (++depth == POLICYDB_BOUNDS_MAXDEPTH) {
 			printk(KERN_ERR "SELinux: type %s: "

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Eric Paris

type is not used at all, stop declaring and assigning it.

Quoted 23 lines

---

 security/selinux/ss/policydb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
security/selinux/ss/policydb.c +2 -2
index b7ef93e..3ff0c24 100644
@@ -1606,11 +1606,11 @@ static int role_bounds_sanity_check(void *key, void *datum, void *datap)
 
 static int type_bounds_sanity_check(void *key, void *datum, void *datap)
 {
-	struct type_datum *upper, *type;
+	struct type_datum *upper;
 	struct policydb *p = datap;
 	int depth = 0;
 
-	upper = type = datum;
+	upper = datum;
 	while (upper->bounds) {
 		if (++depth == POLICYDB_BOUNDS_MAXDEPTH) {
 			printk(KERN_ERR "SELinux: type %s: "
Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
In reply to Eric Paris
Quoted 3 lines · Eric Paris

type is not used at all, stop declaring and assigning it.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

Signature · 7 lines
James Morris
<[email protected]>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.