Changeset 200c945 in rtems


Ignore:
Timestamp:
Feb 1, 2011, 5:55:32 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
c14db0a
Parents:
5410c14
Message:

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

  • libmisc/stringto/stringtounsignedchar.c, libmisc/stringto/stringtounsignedint.c: Reformat range check.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r5410c14 r200c945  
    112011-02-01      Ralf Corsepius <ralf.corsepius@rtems.org>
    22
     3        * libmisc/stringto/stringtounsignedchar.c,
     4        libmisc/stringto/stringtounsignedint.c: Reformat range check.
    35        * libmisc/Makefile.am: Add stringto/stringtolongdouble.c.
    46        * libmisc/stringto/stringtolongdouble.c: New.
  • cpukit/libmisc/stringto/stringtounsignedchar.c

    r5410c14 r200c945  
    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#if (UCHAR_MAX < ULONG_MAX)
  • cpukit/libmisc/stringto/stringtounsignedint.c

    r5410c14 r200c945  
    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#if (UINT_MAX < ULONG_MAX)
Note: See TracChangeset for help on using the changeset viewer.