[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110205144004.GB9814@p183.telecom.by>
Date: Sat, 5 Feb 2011 16:40:04 +0200
From: Alexey Dobriyan <adobriyan@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
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@...il.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists