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

Mike Frysinger vapier.adi at gmail.com
Fri Apr 8 12:20:09 EDT 2011


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



More information about the linux-mtd mailing list