[Buildroot] [PATCH v3] ext-toolchain-wrapper.c: Handle an arbitrary amount of arguments

Daniel Nyström daniel.nystrom at timeterminal.se
Tue Jun 21 21:20:17 UTC 2011


Thanks for your comments, Mike!

2011/6/21 Mike Frysinger <vapier at gentoo.org>:
> 2011/6/21 Daniel Nyström:
>> Even though MAXARGS 1000 seems large, it wasn't enought for at least
>
> enought -> enough

Thanks. I'm sure Peter will fix the spelling when committing.

>> +       cur += sizeof(predef_args) / sizeof(predef_args[0]);
>
> looks like you should add an ARRAY_SIZE define to the top of the file
>
>> +       memcpy(cur, &argv[1], sizeof(char *) * (argc - 1));
>
> in practice there's probably no difference, but this should be sizeof(argv[0])

I actually had both of these in mind, but ended up with this since I
think it looks most "clean". But I guess it's a matter of taste.


More information about the buildroot mailing list