From 19b2ea324aa5260d27507cb9be77c72a07e4afb8 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 11 Jun 2022 21:32:16 +0530 Subject: [PATCH] Skip redundant getutil() call --- src/nnn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index a5dfb547..df326430 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4643,10 +4643,10 @@ static bool handle_archive(char *fpath /* in-out param */, char op) char *util, *outdir = NULL; bool x_to = FALSE; bool is_bsdtar = getutil(utils[UTIL_BSDTAR]); - bool is_atool = getutil(utils[UTIL_ATOOL]); + bool is_atool = !is_bsdtar && getutil(utils[UTIL_ATOOL]); if (op == 'x') { - outdir = xreadline((!is_bsdtar && is_atool) ? "." : xbasename(fpath), messages[MSG_NEW_PATH]); + outdir = xreadline(is_atool ? "." : xbasename(fpath), messages[MSG_NEW_PATH]); if (!outdir || !*outdir) { /* Cancelled */ printwait(messages[MSG_CANCEL], NULL); return FALSE;