aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-12-21 19:12:12 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-12-21 19:12:12 +0530
commit2f86e0d107460e583ff495ac7b5e5cc896d29e1b (patch)
tree5ecd819e2d27034d53280475c8d3b35b030988df /nnn.c
parent988a3dd62145ff49a631837a7006cdf73bcadbe8 (diff)
downloadnnn-2f86e0d107460e583ff495ac7b5e5cc896d29e1b.tar.gz
No need to test end of numeric
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/nnn.c b/nnn.c
index 5f66712..6545a7b 100644
--- a/nnn.c
+++ b/nnn.c
@@ -669,16 +669,14 @@ xstricmp(char *s1, char *s2)
else if (*c1 == '\0' && *c2 == '\0') {
static long long num1, num2;
- num1 = strtoll(s1, &c1, 10);
- num2 = strtoll(s2, &c2, 10);
+ num1 = strtoll(s1, NULL, 10);
+ num2 = strtoll(s2, NULL, 10);
if (num1 != num2) {
if (num1 > num2)
return 1;
else
return -1;
}
-
- *c1 = 0, *c2 = 0;
} else if (*c1 == '\0' && *c2 != '\0')
return -1;
else if (*c1 != '\0' && *c2 == '\0')