[libc] Allow strtoul() to interpret negative numbers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2012-04-17 10:15:29 +01:00
parent d11b82f0e4
commit 1d33649516
4 changed files with 25 additions and 4 deletions

View File

@@ -5,7 +5,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <stdint.h>
#include <assert.h>
#include <ctype.h>
/*****************************************************************************
*
@@ -18,9 +17,6 @@ static inline int strtoul_base ( const char **pp, int base )
{
const char *p = *pp;
while ( isspace ( *p ) )
p++;
if ( base == 0 ) {
base = 10;
if ( *p == '0' ) {