[Samba] [PATCH] smbfs/proc -- use C99 initializer to fix bug.

Stephen Hemminger shemminger at osdl.org
Mon Sep 22 20:52:38 GMT 2003


There is warning in 2.6.0-test5 bk latest from smbfs/proc which looks
like a bug because the second structure element in nls_table is 
alias (a char *) not the uni2char function.  Also, since smbfs can be
built as a module, it needs to set the owner field.

diff -Nru a/fs/smbfs/proc.c b/fs/smbfs/proc.c
--- a/fs/smbfs/proc.c	Mon Sep 22 13:49:43 2003
+++ b/fs/smbfs/proc.c	Mon Sep 22 13:49:43 2003
@@ -212,12 +212,10 @@
 }
 
 static struct nls_table unicode_table = {
-	"unicode",
-	uni2char,
-	char2uni,
-	NULL,		/* not used by smbfs */
-	NULL,
-	NULL,		/* not a module */
+	.charset = "unicode",
+	.uni2char = uni2char,
+	.char2uni = char2uni,
+	.owner = THIS_MODULE,
 };
 
 /* ----------------------------------------------------------- */



More information about the samba mailing list