On Thu, Aug 12, 2010 at 1:25 PM, Marek Polacek <[email protected]> wrote:
>  Here's patch which prevents endless loop in main(), when there are no
> additional parameters specified. Now we have:
>
>        if (count > 0) {
>            if (--count == 0)
>                break;
>        }
>
> but when count is 0, we never get to that break, so we end up looping...

I can achieve the same by setting the default count to 1, not 0.

Here's the fix in git:

http://git.busybox.net/busybox/commit/?id=dcaed97

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to