]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build break
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 27 Jun 2020 17:44:14 +0000 (23:14 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 27 Jun 2020 17:44:14 +0000 (23:14 +0530)
src/nnn.c

index 5da3653a53d4f479af7f8a1d5b6bdd3e6b7ef209..512e2cf1f8031b244360bc82460c56245fe9ae6f 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5781,20 +5781,14 @@ nochange:
                case SEL_CDBEGIN: // fallthrough
                case SEL_CDLAST: // fallthrough
                case SEL_CDROOT:
-                       switch (sel) {
-                       case SEL_CDHOME:
+                       if (sel == SEL_CDHOME)
                                dir = home;
-                               break;
-                       case SEL_CDBEGIN:
+                       else if (sel == SEL_CDBEGIN)
                                dir = ipath;
-                               break;
-                       case SEL_CDLAST:
+                       else if (sel == SEL_CDLAST)
                                dir = lastdir;
-                               break;
-                       default: /* SEL_CDROOT */
-                               dir = "/";
-                               break;
-                       }
+                       else
+                               dir = "/"; /* SEL_CDROOT */
 
                        if (!dir || !*dir) {
                                printwait(messages[MSG_NOT_SET], &presel);