Changeset fe7c9a1f in rtems


Ignore:
Timestamp:
Feb 1, 2011, 5:43:21 AM (8 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
ebf806f
Parents:
a38457a
Message:

2011-02-01 Ralf Corsepius <ralf.corsepius@…>

  • libmisc/stringto/stringtoint.c: Reformat range check. Add check for result==0.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    ra38457a rfe7c9a1f  
    112011-02-01      Ralf Corsepius <ralf.corsepius@rtems.org>
    22
     3        * libmisc/stringto/stringtoint.c: Reformat range check.
     4        Add check for result==0.
    35        * libmisc/stringto/stringtofloat.c: Reformat range check.
    46        Add check for result = -HUGE_VALF.
  • cpukit/libmisc/stringto/stringtoint.c

    ra38457a rfe7c9a1f  
    5050    return RTEMS_NOT_DEFINED;
    5151
    52   if ( (result == LONG_MAX) && (errno == ERANGE) )
    53     return RTEMS_INVALID_NUMBER;
    54 
    55   if ( (result == LONG_MIN) && (errno == ERANGE) )
    56     return RTEMS_INVALID_NUMBER;
     52  if ( ( errno == ERANGE ) &&
     53    (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
     54      return RTEMS_INVALID_NUMBER;
    5755
    5856#if (INT_MAX < LONG_MAX)
Note: See TracChangeset for help on using the changeset viewer.