diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2009-03-31 15:23:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 08:59:16 -0700 |
commit | dc71768742b39bca298e9ca6c91e575cd4b140e6 (patch) | |
tree | 366c9c3890d791b45987cbf8279a5bf8323362cd /arch/um/kernel/config.c.in | |
parent | 792dd4fc317e1f94a6af111a0979c1c0d8c14453 (diff) | |
download | linux-dc71768742b39bca298e9ca6c91e575cd4b140e6.tar.bz2 |
uml: don't use a too long string literal
uml uses a concatenated string literal to store the contents of .config,
but .config file content is varaible, it can be very long.
Use an array of string literals instead.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/config.c.in')
-rw-r--r-- | arch/um/kernel/config.c.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/um/kernel/config.c.in b/arch/um/kernel/config.c.in index c062cbfe386e..bee154d1ba75 100644 --- a/arch/um/kernel/config.c.in +++ b/arch/um/kernel/config.c.in @@ -7,11 +7,15 @@ #include <stdlib.h> #include "init.h" -static __initdata char *config = "CONFIG"; +static __initdata const char *config[] = { +"CONFIG" +}; static int __init print_config(char *line, int *add) { - printf("%s", config); + int i; + for (i = 0; i < sizeof(config)/sizeof(config[0]); i++) + printf("%s", config[i]); exit(0); } |