From 41759fa5dc42d656480a408f59cc62675372c6ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Sch=C3=B6lling?= Date: Thu, 22 May 2014 10:44:01 +1000 Subject: [PATCH] fs/fat/inode.c: clean up string initializations (char[] instead of char *) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- fs/fat/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.39.5