From: Manuel Schölling Date: Fri, 6 Jun 2014 21:36:38 +0000 (-0700) Subject: fs/fat/inode.c: clean up string initializations (char[] instead of char *) X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ef19470ef87d06ed906e2fbb6c9aeb7aaa9acc56;p=linux-beck.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 Signed-off-by: Linus Torvalds --- diff --git a/fs/fat/inode.c b/fs/fat/inode.c index babff0f40696..9c83594d7fb5 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))