sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit b2a0362bf856138c3b78a976a2d851acfa6c8dfc
parent 298703ff2dde5bf8484ac8e101265884884eb758
Author: sin <sin@2f30.org>
Date:   Sun, 27 Oct 2013 09:46:21 +0000

Use estrtol() instead of atoi()

Diffstat:
Mseq.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/seq.c b/seq.c @@ -98,7 +98,7 @@ digitsleft(const char *d) if(*d == '+') d++; exp = strpbrk(d, "eE"); - shift = exp ? atoi(&exp[1]) : 0; + shift = exp ? estrtol(&exp[1], 10) : 0; return MAX(0, strspn(d, "-0123456789")+shift); } @@ -110,7 +110,7 @@ digitsright(const char *d) int shift, after; exp = strpbrk(d, "eE"); - shift = exp ? atoi(&exp[1]) : 0; + shift = exp ? estrtol(&exp[1], 10) : 0; after = (d = strchr(d, '.')) ? strspn(&d[1], "0123456789") : 0; return MAX(0, after-shift);