aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-05-21 20:57:53 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-05-22 19:27:33 +0530
commit1e1518c1470e0fd83e8c80ae493be1687618223b (patch)
treeefa94eddd450052efecc530dc8bdd17e34ae9c28
parentc61f950f28f829fd444eb5b1e597ac88d16aaa6d (diff)
downloadnnn-1e1518c1470e0fd83e8c80ae493be1687618223b.tar.gz
Remove redundant variable
-rw-r--r--README.md4
-rw-r--r--nnn.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/README.md b/README.md
index 1a9b014..785a975 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,7 @@ nnn vs. ncdu memory usage while listing 438767 files in disk usage analyzer mode
```
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22515 vaio 20 0 60348 48712 2240 S 0.0 0.6 0:01.11 ncdu /
-22574 vaio 20 0 17588 4320 2584 S 0.3 0.1 0:00.44 nnn -d /
+22574 vaio 20 0 17588 4320 2584 S 0.0 0.1 0:00.44 nnn -d /
```
nnn vs. mc vs. ranger memory usage while viewing a directory with 11244 files, sorted by size:
@@ -100,7 +100,7 @@ nnn vs. mc vs. ranger memory usage while viewing a directory with 11244 files, s
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28450 vaio 20 0 93848 51548 7724 S 0.0 0.6 0:00.64 /usr/bin/python -O /usr/bin/ranger
27265 vaio 20 0 67188 13620 6908 S 0.0 0.2 0:00.16 mc
-28360 vaio 20 0 20520 6932 2512 S 0.3 0.1 0:00.20 nnn
+28360 vaio 20 0 20520 6932 2512 S 0.0 0.1 0:00.20 nnn
```
### Installation
diff --git a/nnn.c b/nnn.c
index 8f36a24..4cee5b3 100644
--- a/nnn.c
+++ b/nnn.c
@@ -215,10 +215,9 @@ xstrlcpy(char *dest, const char *src, size_t n)
* We are only looking for '/' in this program.
*/
static void *
-xmemrchr(const void *s, int c, size_t n)
+xmemrchr(const void *s, unsigned char ch, size_t n)
{
- unsigned char *p;
- unsigned char ch = (unsigned char)c;
+ static unsigned char *p;
if (!s || !n)
return NULL;