[patch 3/3 with proper signed-off] fs/cifs/netmisc.c: fix sparse warning

Domen Puncer domen at coderock.org
Sun Mar 20 11:56:35 GMT 2005


Signed-off-by: Alexey Dobriyan <adobriyan at mail.ru>
Signed-off-by: Domen Puncer <domen at coderock.org>
---


 kj-domen/fs/cifs/netmisc.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN fs/cifs/netmisc.c~sparse-fs_cifs_netmisc fs/cifs/netmisc.c
--- kj/fs/cifs/netmisc.c~sparse-fs_cifs_netmisc	2005-03-20 12:11:26.000000000 +0100
+++ kj-domen/fs/cifs/netmisc.c	2005-03-20 12:11:26.000000000 +0100
@@ -132,7 +132,6 @@ static const struct smb_to_posix_error m
 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 */
 }
 
_


More information about the samba-technical mailing list