Messages in this thread | | | Date | Sat, 5 Feb 2011 16:40:04 +0200 | From | Alexey Dobriyan <> | Subject | Re: [PATCH 01/52] kstrtox: converting strings to integers done (hopefully) right |
| |
On Sat, Feb 05, 2011 at 03:33:41PM +0100, Geert Uytterhoeven wrote: > On Sat, Feb 5, 2011 at 15:20, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > + * Convert integer string representation to an integer. > > + * If an integer doesn't fit into specified type, -E is returned. > > Which -E? Currently it returns -EINVAL everywhere.
Comment meant function follows 0/-E idiom for return value.
> > + if (tmp != (unsigned long long)(unsigned long)tmp) > > + return -EINVAL; > > -ERANGE for out-of-range?
Hmm, interesting. It should prevent -EINVAL hardcoding. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |