aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-01 23:20:55 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-08-01 23:31:30 +0530
commit1fb1ab55a7cb69ec6e0214676e314de07077eb5b (patch)
tree45006605f67fb970bff879f992ba48bdd8aa5668
parente557bd2ed90db94e21eb9b192e955fde8aa53e4e (diff)
downloadnnn-1fb1ab55a7cb69ec6e0214676e314de07077eb5b.tar.gz
Fix build break
-rw-r--r--README.md2
-rw-r--r--src/nnn.c12
2 files changed, 5 insertions, 9 deletions
diff --git a/README.md b/README.md
index 05e0745..5aaa7dd 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@ It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw
- Minimizes screen refresh with fast line redraws
- Tiny binary (typically less than 100KB)
- Portable
- - Statically-linked binary available
+ - Static binary available (no need to install)
- Language-agnostic plugins
- Minimal library deps, easy to compile
- Compile in/out features with make variables
diff --git a/src/nnn.c b/src/nnn.c
index e0d75ae..a3d8be5 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5820,14 +5820,10 @@ nochange:
case SEL_CDBEGIN: // fallthrough
case SEL_CDLAST: // fallthrough
case SEL_CDROOT:
- if (sel == SEL_CDHOME)
- dir = home;
- else if (sel == SEL_CDBEGIN)
- dir = ipath;
- else if (sel == SEL_CDLAST)
- dir = lastdir;
- else
- dir = "/"; /* SEL_CDROOT */
+ dir = (sel == SEL_CDHOME) ? home
+ : ((sel == SEL_CDBEGIN) ? ipath
+ : ((sel == SEL_CDLAST) ? lastdir
+ : "/" /* SEL_CDROOT */));
if (!dir || !*dir) {
printwait(messages[MSG_NOT_SET], &presel);