Re: [PATCH 09/18] revert: Don't create invalid replay_opts in parse_args
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Aug 4, 2011, 09:34 UTC
- Message-ID
- <CALkWK0k3ySLuY+7ogVJ6fmz59E6Gh2k26YLLY_LCvKFyDN5_iQ@mail.gmail.com>
- In-Reply-To
- <201108020841.41593.chriscool@tuxfamily.org>
Hi Christian,
Christian Couder writes:
Show 6 quoted lines
> ... and we could remove the "set" variable like this:
>
> while ((this_opt = va_arg(ap, const char *))) {
> if (va_arg(ap, int))
> break;
> }Very elegant- I especially like this. You've reduced this to simply checking if the while loop ended properly, or broke (using a break statement) by checking the conditional that drove the loop.
Thanks.
-- Ram