From 44a78c05b3946804e98686dd5f22d57f00186547 Mon Sep 17 00:00:00 2001 From: Charles Suh Date: Mon, 9 Jan 2023 12:49:35 -0800 Subject: [PATCH] libzpool: fix ddi_strtoull to update nptr Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Signed-off-by: Charles Suh Closes #14360 --- lib/libzpool/kernel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);