Skip redundant getutil() call

This commit is contained in:
Arun Prakash Jana 2022-06-11 21:32:16 +05:30
parent 03fc3b99c5
commit 19b2ea324a
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 2 additions and 2 deletions

View File

@ -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;