diff options
Diffstat (limited to 'src/core/base16.c')
| -rw-r--r-- | src/core/base16.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/base16.c b/src/core/base16.c index bf9cc21bb..d2977bde1 100644 --- a/src/core/base16.c +++ b/src/core/base16.c @@ -20,9 +20,10 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <stdint.h> -#include <stdlib.h> #include <stdio.h> #include <errno.h> +#include <assert.h> +#include <ipxe/string.h> #include <ipxe/base16.h> /** @file @@ -87,13 +88,13 @@ int hex_decode ( const char *encoded, char separator, void *data, size_t len ) { /* Extract digits. Note that either digit may be NUL, * which would be interpreted as an invalid value by - * strtoul_charval(); there is therefore no need for an + * digit_value(); there is therefore no need for an * explicit end-of-string check. */ - sixteens = strtoul_charval ( *(encoded++) ); + sixteens = digit_value ( *(encoded++) ); if ( sixteens >= 16 ) return -EINVAL; - units = strtoul_charval ( *(encoded++) ); + units = digit_value ( *(encoded++) ); if ( units >= 16 ) return -EINVAL; |
