[hackers] [sbase] Use estrtol() instead of atoi() || sin

From: <git_AT_suckless.org>
Date: Sun, 27 Oct 2013 10:49:35 +0100

commit b2a0362bf856138c3b78a976a2d851acfa6c8dfc
Author: sin <sin_AT_2f30.org>
Date: Sun Oct 27 09:46:21 2013 +0000

    Use estrtol() instead of atoi()

diff --git a/seq.c b/seq.c
index 4023876..5b3d5f0 100644
--- a/seq.c
+++ b/seq.c
_AT_@ -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);
 }
_AT_@ -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);
Received on Sun Oct 27 2013 - 10:49:35 CET

This archive was generated by hypermail 2.3.0 : Sun Oct 27 2013 - 11:00:18 CET