forked from Imagelibrary/rtems
2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>
* libmisc/stringto/stringtolong.c: Reformat range check. Add check for result==0.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* libmisc/stringto/stringtolong.c: Reformat range check.
|
||||||
|
Add check for result==0.
|
||||||
|
|
||||||
2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>
|
2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* libmisc/Makefile.am: Remove stringto/stringto_template.h.
|
* libmisc/Makefile.am: Remove stringto/stringto_template.h.
|
||||||
|
|||||||
@@ -49,10 +49,8 @@ rtems_status_code rtems_string_to_long (
|
|||||||
if ( end == s )
|
if ( end == s )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
if ( (result == LONG_MAX) && (errno == ERANGE) )
|
if ( ( errno == ERANGE ) &&
|
||||||
return RTEMS_INVALID_NUMBER;
|
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
|
||||||
|
|
||||||
if ( (result == LONG_MIN) && (errno == ERANGE) )
|
|
||||||
return RTEMS_INVALID_NUMBER;
|
return RTEMS_INVALID_NUMBER;
|
||||||
|
|
||||||
*n = result;
|
*n = result;
|
||||||
|
|||||||
Reference in New Issue
Block a user