Skip to content
Commit 0b1aa087 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Andrei Vagin
Browse files

util: xatol() and xatoi() helpers introduced



These helpers are safe versions of atol() and atoi() respectively.
And they check for overflow and NAN errors

v3:
1) Added string print to convertion error message in xatol_base()
2) Added check for INT range in xatoi()

Signed-off-by: default avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent 47761827
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment