... 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