Skip to contentSkip to conversation

fs/cifs/netmisc.c: fix sparse warning

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/cifs/netmisc.c: fix sparse warning

fs/cifs/netmisc.c +1 -3
Index: linux-2.6.11-bk2-sparse/fs/cifs/netmisc.c
===================================================================
@@ -132,7 +132,6 @@ const struct smb_to_posix_error mapping_
 int
 cifs_inet_pton(int address_family, char *cp,void *dst)
 {
-	struct in_addr address;
 	int value;
 	int digit;
 	int i;
@@ -189,8 +188,7 @@ cifs_inet_pton(int address_family, char 
 	if (value > addr_class_max[end - bytes])
 		return 0;
 
-	address.s_addr = *((__be32 *) bytes) | htonl(value);
-	*((__be32 *)dst) = address.s_addr;
+	*((__be32 *)dst) = *((__be32 *) bytes) | htonl(value);
 	return 1; /* success */
 }
 

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