]> git.proxmox.com Git - mirror_zfs.git/commitdiff
libzpool: fix ddi_strtoull to update nptr
authorCharles Suh <charlessuh@users.noreply.github.com>
Mon, 9 Jan 2023 20:49:35 +0000 (12:49 -0800)
committerGitHub <noreply@github.com>
Mon, 9 Jan 2023 20:49:35 +0000 (12:49 -0800)
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

lib/libzpool/kernel.c

index 0e3e4cee7baaf0a7d7f55d72ed437c291c332d57..a9b9bf4c2ce5474162c1ec61376591e013ad70af 100644 (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);