From b9ec0339d8e22cadf2d9d1b010b51dc53837dfb0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 16 Oct 2007 23:29:54 -0700 Subject: add consts where appropriate in fs/nls/* Add const modifiers to a few struct nls_table's member pointers in include/linux/nls.h and adds a lot of const's in fs/nls/*.c files. Resulting changes as visible by size: text data bss dec hex filename 113612 481216 2368 597196 91ccc nls.org/built-in.o 593548 3296 288 597132 91c8c nls/built-in.o Apparently compiler managed to optimize code a bit better because of const-ness. No other changes are made. Signed-off-by: Denys Vlasenko Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/nls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/nls.h b/include/linux/nls.h index 816c04ad738..6a882208301 100644 --- a/include/linux/nls.h +++ b/include/linux/nls.h @@ -7,13 +7,13 @@ typedef __u16 wchar_t; struct nls_table { - char *charset; - char *alias; + const char *charset; + const char *alias; int (*uni2char) (wchar_t uni, unsigned char *out, int boundlen); int (*char2uni) (const unsigned char *rawstring, int boundlen, wchar_t *uni); - unsigned char *charset2lower; - unsigned char *charset2upper; + const unsigned char *charset2lower; + const unsigned char *charset2upper; struct module *owner; struct nls_table *next; }; -- cgit v1.2.3-70-g09d2