aboutsummaryrefslogtreecommitdiff
path: root/lib/str.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2020-11-30 14:09:49 -0500
committerGitHub <noreply@github.com>2020-11-30 14:09:49 -0500
commitecc7897bf007c0672d5bdc7711bcbf9fb104f995 (patch)
tree9646047ca1f4b6f4a54e749d8670b11d940bf616 /lib/str.c
parentefb60e95320be455e28273b9c580b28cfceb6a1d (diff)
parenta20b46933554a91aeece1bf73810a25dd0b579a9 (diff)
downloadspmc-master.tar.gz
Merge pull request #50 from jhunkeler/atoi-to-strtolHEADmaster
Replace atoi usage
Diffstat (limited to 'lib/str.c')
-rw-r--r--lib/str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/str.c b/lib/str.c
index 5fbb8ad..fbf6e9d 100644
--- a/lib/str.c
+++ b/lib/str.c
@@ -427,8 +427,8 @@ static int _strsort_numeric_compare(const void *a, const void *b) {
const char *bb = *(const char **)b;
if (isdigit(*aa) && isdigit(*bb)) {
- int ia = atoi(aa);
- int ib = atoi(bb);
+ long ia = strtol(aa, NULL, 10);
+ long ib = strtol(bb, NULL, 10);
if (ia == ib) {
return 0;