Skip to contentSkip to conversation

security/selinux/ss/conditional.c: fix sparse warnings

PATCH New Alexey Dobriyan 1 participant 1 message Mar 9, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 security/selinux/ss/conditional.c: fix sparse warnings

security/selinux/ss/conditional.c +8 -4
Index: linux-2.6.11-bk3-sparse/security/selinux/ss/conditional.c
===================================================================
@@ -219,7 +219,8 @@ int cond_read_bool(struct policydb *p, s
 {
 	char *key = NULL;
 	struct cond_bool_datum *booldatum;
-	u32 buf[3], len;
+	__le32 buf[3];
+	u32 len;
 	int rc;
 
 	booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL);
@@ -263,7 +264,8 @@ static int cond_read_av_list(struct poli
 	struct avtab_datum datum;
 	struct avtab_node *node_ptr;
 	int rc;
-	u32 buf[1], i, len;
+	__le32 buf[1];
+	u32 i, len;
 	u8 found;
 
 	*ret_list = NULL;
@@ -369,7 +371,8 @@ static int expr_isvalid(struct policydb 
 
 static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp)
 {
-	u32 buf[2], len, i;
+	__le32 buf[2];
+	u32 len, i;
 	int rc;
 	struct cond_expr *expr = NULL, *last = NULL;
 
@@ -427,7 +430,8 @@ err:
 int cond_read_list(struct policydb *p, void *fp)
 {
 	struct cond_node *node, *last = NULL;
-	u32 buf[1], i, len;
+	__le32 buf[1];
+	u32 i, len;
 	int rc;
 
 	rc = next_entry(buf, fp, sizeof buf);

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors