On 07/30/2013 07:08:11 PM, Strake wrote:
On 30/07/2013, Felix Janda <felix.ja...@posteo.de> wrote:
>> > You don't really need the index. Just loop over toys.optargs, which are
>> > conveniently null terminated.
>>
>> To me, at least, it is clearer with the index, as it's a commoner idiom.
>
> I can't really argue with that.

I'm not against your method, but it's not how I'd write it.

>> +    if (!isdigit (toys.optargs[ii][0])) {
>> +      error_msg ("not a number: %s", toys.optargs[ii]);
>> +      continue;
>> +    }
>> +    id = strtoul (toys.optargs[ii], 0, 10);
>
> Any reason only to check the first char?

No.

I cleaned this up and moved it out of pending before I caught up with this patch.

Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to