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 <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
*/
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