aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2014-08-27 06:58:56 -0400
committerRusty Russell <rusty@rustcorp.com.au>2014-08-27 08:24:11 -0400
commitd93e1719a313ca960b38c5159be0106884317997 (patch)
tree10230aeafdbf5e41618c36b411bb2753e84702e7 /scripts/mod
parent7a3ee7538598e0d60e6aa87dcf34a4e8a0adebc2 (diff)
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 <minipli@googlemail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c2
1 files changed, 1 insertions, 1 deletions
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)
2212 err = 0; 2212 err = 0;
2213 2213
2214 for (mod = modules; mod; mod = mod->next) { 2214 for (mod = modules; mod; mod = mod->next) {
2215 char fname[strlen(mod->name) + 10]; 2215 char fname[PATH_MAX];
2216 2216
2217 if (mod->skip) 2217 if (mod->skip)
2218 continue; 2218 continue;