aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-02-10 13:25:54 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-02-10 13:25:54 +0530
commit22825c0f37fab79f586eba5c0ed0620bdb4dccb6 (patch)
treee0847677d5d78535f513f41cead4b357d5ce3c4f
parentfc7a21f6e1e87c11a18ab3dd33bfee8a0ef7051c (diff)
downloadnnn-22825c0f37fab79f586eba5c0ed0620bdb4dccb6.tar.gz
Simplify check
-rw-r--r--src/nnn.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nnn.c b/src/nnn.c
index b837959..3d88772 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3867,10 +3867,7 @@ nochange:
}
if (S_ISREG(sb.st_mode)) {
- if (ndents)
- tmp = dents[cur].name;
- else
- tmp = NULL;
+ tmp = ndents ? dents[cur].name : NULL;
spawn(shell, scriptpath, tmp, path, F_NORMAL | F_SIGINT);
}
break;