aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-12-20 00:42:11 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-12-20 00:42:11 +0530
commit106c7c237140c4eb7df7e5e4d74f9bdafee4ee32 (patch)
treea034c52f9dbe25bf611f55bfafba9e7542f83952
parentd135af33af916d24231c3f43d9cdb541278b124d (diff)
downloadnnn-106c7c237140c4eb7df7e5e4d74f9bdafee4ee32.tar.gz
Retire redundant variable
-rw-r--r--nnn.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/nnn.c b/nnn.c
index b2f5da3..a74f4ee 100644
--- a/nnn.c
+++ b/nnn.c
@@ -917,10 +917,7 @@ filterentries(char *path)
static char ln[REGEX_MAX];
static wchar_t wln[REGEX_MAX];
static wint_t ch[2] = {0};
- static int maxlen = REGEX_MAX - 1;
- int r, total = ndents;
- int oldcur = cur;
- int len = 1;
+ int r, total = ndents, oldcur = cur, len = 1;
char *pln = ln + 1;
ln[0] = wln[0] = FILTER;
@@ -976,7 +973,7 @@ filterentries(char *path)
if (len == 1)
cur = 0;
- if (len == maxlen)
+ if (len == REGEX_MAX - 1)
break;
wln[len] = (wchar_t)*ch;