Changeset 37ecff5c in rtems


Ignore:
Timestamp:
Feb 1, 2011, 5:36:03 AM (8 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
c368bd6
Parents:
80604fa
Message:

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

  • libmisc/stringto/stringtounsignedlong.c: Reformat range check.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r80604fa r37ecff5c  
    112011-02-01      Ralf Corsepius <ralf.corsepius@rtems.org>
    22
     3        * libmisc/stringto/stringtounsignedlong.c: Reformat range check.
    34        * libmisc/stringto/stringtolong.c:  Reformat range check.
    45        Add check for result==0.
  • cpukit/libmisc/stringto/stringtounsignedlong.c

    r80604fa r37ecff5c  
    5050    return RTEMS_NOT_DEFINED;
    5151
    52   if ( (result == ULONG_MAX) && (errno == ERANGE) )
    53     return RTEMS_INVALID_NUMBER;
    54 
    55   if ( (result == 0) && (errno == ERANGE) )
    56     return RTEMS_INVALID_NUMBER;
     52  if ( ( errno == ERANGE ) &&
     53    (( result == 0 ) || ( result == ULONG_MAX )))
     54      return RTEMS_INVALID_NUMBER;
    5755
    5856  *n = result;
Note: See TracChangeset for help on using the changeset viewer.