From d93e1719a313ca960b38c5159be0106884317997 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Wed, 27 Aug 2014 20:28:56 +0930 Subject: modpost: simplify file name generation of *.mod.c files Avoid the variable length array (vla), just use PATH_MAX instead. This not only makes this code clang friedly, it also leads to a code size reduction: text data bss dec hex filename 51765 2224 12416 66405 10365 scripts/mod/modpost.old 51677 2224 12416 66317 1030d scripts/mod/modpost.new Signed-off-by: Mathias Krause Signed-off-by: Rusty Russell --- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index c2ebdc788f4c..3b405c726ec5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2212,7 +2212,7 @@ int main(int argc, char **argv) err = 0; for (mod = modules; mod; mod = mod->next) { - char fname[strlen(mod->name) + 10]; + char fname[PATH_MAX]; if (mod->skip) continue; -- cgit v1.2.3