diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 0e3e4cee7..a9b9bf4c2 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -770,10 +770,8 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len) int ddi_strtoull(const char *str, char **nptr, int base, u_longlong_t *result) { - (void) nptr; - char *end; - - *result = strtoull(str, &end, base); + errno = 0; + *result = strtoull(str, nptr, base); if (*result == 0) return (errno); return (0);