Skip to content

Commit 44a78c0

Browse files
authored
libzpool: fix ddi_strtoull to update nptr
Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Charles Suh <[email protected]> Closes #14360
1 parent 5091867 commit 44a78c0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/libzpool/kernel.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,8 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len)
770770
int
771771
ddi_strtoull(const char *str, char **nptr, int base, u_longlong_t *result)
772772
{
773-
(void) nptr;
774-
char *end;
775-
776-
*result = strtoull(str, &end, base);
773+
errno = 0;
774+
*result = strtoull(str, nptr, base);
777775
if (*result == 0)
778776
return (errno);
779777
return (0);

0 commit comments

Comments
 (0)