aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-06-27 23:14:14 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-06-27 23:14:14 +0530
commitcb9e7851459d01f513cc02257ebca37b5c6ca7a7 (patch)
treed38cbaa50f547fd37d21d52c78a53f8de9923d52
parent56b96cbf74b4d90b704c89da461cd063f81a9fb6 (diff)
downloadnnn-cb9e7851459d01f513cc02257ebca37b5c6ca7a7.tar.gz
Fix build break
-rw-r--r--src/nnn.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 5da3653..512e2cf 100644
--- 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);