From 1fb1ab55a7cb69ec6e0214676e314de07077eb5b Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 1 Aug 2020 23:20:55 +0530 Subject: Fix build break --- src/nnn.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2