From: Manuel Schölling Date: Thu, 22 May 2014 00:44:01 +0000 (+1000) Subject: fs/fat/inode.c: clean up string initializations (char[] instead of char *) X-Git-Tag: next-20140530~2^2~79 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=41759fa5dc42d656480a408f59cc62675372c6ad;p=karo-tx-linux.git fs/fat/inode.c: clean up string initializations (char[] instead of char *) Initializations like 'char *foo = "bar"' will create two variables: a static string and a pointer (foo) to that static string. Instead 'char foo[] = "bar"' will declare a single variable and will end up in shorter assembly (according to Jeff Garzik on the KernelJanitor's TODO list). Signed-off-by: Manuel Schölling Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton --- diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 7410a896eb3c..280c1a026ebb 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -421,7 +421,7 @@ struct inode *fat_iget(struct super_block *sb, loff_t i_pos) static int is_exec(unsigned char *extension) { - unsigned char *exe_extensions = "EXECOMBAT", *walk; + unsigned char exe_extensions[] = "EXECOMBAT", *walk; for (walk = exe_extensions; *walk; walk += 3) if (!strncmp(extension, walk, 3))