[Toybox] [patch] add renice

Rob Landley rob at landley.net
Fri Aug 2 08:40:02 PDT 2013


On 07/30/2013 07:08:11 PM, Strake wrote:
> On 30/07/2013, Felix Janda <felix.janda at 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
 1375458002.0


More information about the Toybox mailing list