diff options
Diffstat (limited to 'cpukit/libmisc/stringto/stringtofloat.c')
-rw-r--r-- | cpukit/libmisc/stringto/stringtofloat.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/libmisc/stringto/stringtofloat.c b/cpukit/libmisc/stringto/stringtofloat.c index 1a3382bc1d..e9c398df3d 100644 --- a/cpukit/libmisc/stringto/stringtofloat.c +++ b/cpukit/libmisc/stringto/stringtofloat.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Convert String to Float (with validation) + * @ingroup libmisc_conv_help Conversion Helpers + */ + /* * COPYRIGHT (c) 2009. * On-Line Applications Research Corporation (OAR). @@ -46,7 +53,7 @@ rtems_status_code rtems_string_to_float ( if ( end == s ) return RTEMS_NOT_DEFINED; - if ( ( errno == ERANGE ) && + if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; |