]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build break
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 1 Aug 2020 17:50:55 +0000 (23:20 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 1 Aug 2020 18:01:30 +0000 (23:31 +0530)
README.md
src/nnn.c

index 05e0745df29505bafbf11c06877ce712b90568f9..5aaa7dd4d5846f6f9f519c0160afcd3a61fd3922 100644 (file)
--- 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
index e0d75ae5bf34ef00dbb9a435b7edc5e8f154d618..a3d8be5f39c64342fa2d5a9491620920489b4cd0 100644 (file)
--- 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);