From a20b46933554a91aeece1bf73810a25dd0b579a9 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 24 Jun 2020 01:36:27 -0400 Subject: Replace atoi usage --- lib/str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/str.c') 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; -- cgit