svn commit: r254600 - head/lib/libutil

Andrey Chernov ache at freebsd.org
Wed Aug 21 17:21:57 UTC 2013


On 21.08.2013 20:46, Sergey Kandaurov wrote:
>  	number = strtoumax(buf, &endptr, 0);
>  
> +	if (number == UINTMAX_MAX && errno == ERANGE) {
> +		return (-1);
> +	}

You need to reset errno before strtoumax() call (errno = 0), because any
of previous functions may left it as ERANGE.

-- 
http://ache.vniz.net/
bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r


More information about the svn-src-all mailing list