All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RFC] selinux: fix a couple of sparse warnings
@ 2010-02-07 23:14 James Morris
  2010-02-09  7:09 ` KaiGai Kohei
  0 siblings, 1 reply; 3+ messages in thread
From: James Morris @ 2010-02-07 23:14 UTC (permalink / raw)
  To: selinux; +Cc: linux-security-module, Stephen Smalley, KaiGai Kohei

Please review.

These warnings were introduced in commit 
44c2d9bdd7022ca7d240d5adc009296fc1c6ce08

----


    selinux: fix a couple of sparse warnings
    
    Fix a couple of sparse warnings for callers of
    context_struct_to_string, which takes a *u32, not an *int.
    
    These cases are harmless as the values are not used.
    
    Signed-off-by: James Morris <jmorris@namei.org>

diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 4e976f5..0e5c3a4 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -455,7 +455,8 @@ static void security_dump_masked_av(struct context *scontext,
 	char *scontext_name = NULL;
 	char *tcontext_name = NULL;
 	char *permission_names[32];
-	int index, length;
+	int index;
+	u32 length;
 	bool need_comma = false;
 
 	if (!permissions)
@@ -807,7 +808,7 @@ int security_bounded_transition(u32 old_sid, u32 new_sid)
 	if (rc) {
 		char *old_name = NULL;
 		char *new_name = NULL;
-		int length;
+		u32 length;
 
 		if (!context_struct_to_string(old_context,
 					      &old_name, &length) &&



-- 
James Morris
<jmorris@namei.org>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-16  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-07 23:14 [PATCH][RFC] selinux: fix a couple of sparse warnings James Morris
2010-02-09  7:09 ` KaiGai Kohei
2010-02-16  1:46   ` KaiGai Kohei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.