libzpool: fix ddi_strtoull to update nptr

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Charles Suh <charles.suh@gmail.com>
Closes #14360
This commit is contained in:
Charles Suh 2023-01-09 12:49:35 -08:00 committed by GitHub
parent 5091867ee6
commit 44a78c05b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);