[Toybox] [landley/toybox] More xargs cleanup, with one possible accounting error but not what fixes (b39584e)

Rob Landley rob at landley.net
Mon Oct 28 21:18:23 PDT 2019


On 10/28/19 5:34 PM, enh-google wrote:
> >   // count entries
> >   for (entries = 0, bytes = -1; entries < toys.optc; entries++)
> >     bytes += strlen(toys.optargs[entries])+1+sizeof(char *)*!FLAG(s);
>
> why is this initialized to |bytes = -1|?

Because  "echo one | xargs -s 9" should succeed but -s 8 should fail.

Rob



More information about the Toybox mailing list