1
0
Fork 0

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>
hifive-unleashed-5.1
Mathias Krause 2014-08-27 20:28:56 +09:30 committed by Rusty Russell
parent 7a3ee75385
commit d93e1719a3
1 changed files with 1 additions and 1 deletions

View File

@ -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;