[PATCH 1/2] mtd-utils: improve simple_strtoX usage commentary

Artem Bityutskiy dedekind1 at gmail.com
Sat Apr 9 10:39:50 EDT 2011


On Fri, 2011-04-08 at 12:20 -0400, Mike Frysinger wrote:
> On Fri, Apr 8, 2011 at 11:07, Artem Bityutskiy wrote:
> > + * num = simple_strtoul(str, &error);
> > + * if (error || !is_valid_number(num))
> > + *     error_happened();
> 
> when i read this, it makes me think there is a "is_valid_number()"
> function i should be calling.
> 
> maybe something like:
> if (error || ... number is out of range for your need ...)
> -mike

I'll do this and push this out, thanks for review!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list