diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-12-20 04:10:01 -0600 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-12-20 04:10:01 -0600 |
commit | 4e663ae7b5f896be300acf5c31d18d582ae44604 (patch) | |
tree | 4e7c41687150824dab00588c2f0c7ae4b8c5b1e4 /cpukit/libmisc/stringto/stringtounsignedint.c | |
parent | Merge branch 'master' of ssh://git.rtems.org/data/git/rtems (diff) | |
parent | libfs: Doxygen Enhancement Task #1 (diff) | |
download | rtems-4e663ae7b5f896be300acf5c31d18d582ae44604.tar.bz2 |
Merge branch 'master' of ssh://git.rtems.org/data/git/rtems
Diffstat (limited to 'cpukit/libmisc/stringto/stringtounsignedint.c')
-rw-r--r-- | cpukit/libmisc/stringto/stringtounsignedint.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/libmisc/stringto/stringtounsignedint.c b/cpukit/libmisc/stringto/stringtounsignedint.c index b7a24be54d..53aaf10bf8 100644 --- a/cpukit/libmisc/stringto/stringtounsignedint.c +++ b/cpukit/libmisc/stringto/stringtounsignedint.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Convert String to Unsigned Int (with validation) + * @ingroup libmisc_conv_help Conversion Helpers + */ + /* * COPYRIGHT (c) 2009. * On-Line Applications Research Corporation (OAR). @@ -47,7 +54,7 @@ rtems_status_code rtems_string_to_unsigned_int ( if ( end == s ) return RTEMS_NOT_DEFINED; - if ( ( errno == ERANGE ) && + if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; |