[BusyBox 0000980]: patch to avoid "broadcast +" syntax

Roberto A. Foglietta roberto.foglietta at gmail.com
Tue Nov 28 00:15:40 PST 2006


2006/11/27, Rob Landley <rob at landley.net>:
> On Monday 27 November 2006 1:02 pm, Roberto A. Foglietta wrote:
> > argv is a vector which is not limited by argc so *++argv is always a
> > good pointer which could be randomly NULL or not.
>
> No, argv[argc] should be NULL and none of the ones before it should be.  It's
> not random, argc is redundant and argv[] is a null terminated array of char
> pointers.

 Sorry Rob but I was writing about randomness of

 argv[argc+1] ?= NULL

 in fact in the my patched ifconfig code there are two test like this

 if((*++argv) == NULL)

 in which if the first is true (argv[argc]) the second happens but the
result is random but even the randomness of the result ifconfig do the
same thing because the two paths join togheter very soon after
random-result-if and the few code before does not matter because
setting broadcast is always the last thing ifconfig does.

 I think was easier writing the patch than explaing ifconfig/patch working!


 Cheers,
-- 
/roberto


More information about the busybox mailing list