Skip to content

Commit 2da5d31

Browse files
author
James Morris
committed
security: 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> Acked-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
1 parent 97d6931 commit 2da5d31

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

security/selinux/ss/services.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ static void security_dump_masked_av(struct context *scontext,
455455
char *scontext_name = NULL;
456456
char *tcontext_name = NULL;
457457
char *permission_names[32];
458-
int index, length;
458+
int index;
459+
u32 length;
459460
bool need_comma = false;
460461

461462
if (!permissions)
@@ -807,7 +808,7 @@ int security_bounded_transition(u32 old_sid, u32 new_sid)
807808
if (rc) {
808809
char *old_name = NULL;
809810
char *new_name = NULL;
810-
int length;
811+
u32 length;
811812

812813
if (!context_struct_to_string(old_context,
813814
&old_name, &length) &&

0 commit comments

Comments
 (0)