lkml.org 
[lkml]   [2008]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] lib: vsprintf.c remove macros defining strict string functions
From
Date

On Wed, 2008-05-07 at 12:20 -0700, Harvey Harrison wrote:
> On Thu, 2008-05-08 at 00:09 +0400, Alexey Dobriyan wrote:
> > On Wed, May 07, 2008 at 11:25:29AM -0700, Harvey Harrison wrote:
> > > Directly code the strict string conversion functions rather than using
> > > defining macros. Pull out a small helper to check the strict conditions
> > > required at the end of a string (nul-terminated or newline).
> >
> > > Add additional checks in strict_strtol and strict_strtoll for numeric
> > > overflow of the signed types.
> >
> > C interer ranges are asymmetric.
>
> Yes, and LLONG_MAX = -LLONG_MIN + 1...so it will reject string values
> of LLONG_MIN...easily fixed if we want it I guess.


Missed the braces above obviously....but the point stands.
Harvey



\
 
 \ /
  Last update: 2008-05-07 21:27    [from the cache]
©2003-2011 Jasper Spaans