提交 d93e1719 编写于 作者: M Mathias Krause 提交者: Rusty Russell

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: NMathias Krause <minipli@googlemail.com>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 7a3ee753
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册