From b089256c3a0a5bcd62c5e9e9d93f7e7cbac2b31e Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Tue, 25 Jun 2019 17:04:42 -0400 Subject: [PATCH] libfrog: cvt_u64 should use strtoull, not strtoll cvt_u64 converts a string to an unsigned 64-bit number, so it should use strtoull, not strtoll because we don't want negative numbers here. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- libfrog/convert.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libfrog/convert.c b/libfrog/convert.c index 623975075..8d4d4077b 100644 --- a/libfrog/convert.c +++ b/libfrog/convert.c @@ -105,14 +105,14 @@ cvt_s16( */ uint64_t cvt_u64( - char *s, - int base) + char *s, + int base) { - long long i; - char *sp; + unsigned long long i; + char *sp; errno = 0; - i = strtoll(s, &sp, base); + i = strtoull(s, &sp, base); /* * If the input would over or underflow, return the clamped * value and let the user check errno. If we went all the -- 2.47.2