(shell_execute): fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-03-10 12:01:43 +03:00
parent 059cd9569f
commit d6f6c29c0b

View File

@ -425,7 +425,7 @@ shell_execute (const char *command, int flags)
{
char *cmd = NULL;
if (flags & EXECUTE_HIDE)
if ((flags & EXECUTE_HIDE) != 0)
{
cmd = g_strconcat (" ", command, (char *) NULL);
flags ^= EXECUTE_HIDE;
@ -435,13 +435,14 @@ shell_execute (const char *command, int flags)
if (mc_global.tty.use_subshell)
{
if (subshell_state == INACTIVE)
do_execute (mc_global.shell->path, cmd ? cmd : command, flags | EXECUTE_AS_SHELL);
do_execute (mc_global.shell->path, cmd != NULL ? cmd : command,
flags | EXECUTE_AS_SHELL);
else
message (D_ERROR, MSG_ERROR, "%s", _("The shell is already running a command"));
}
else
#endif /* ENABLE_SUBSHELL */
do_execute (mc_global.shell->path, cmd ? cmd : command, flags | EXECUTE_AS_SHELL);
do_execute (mc_global.shell->path, cmd != NULL ? cmd : command, flags | EXECUTE_AS_SHELL);
g_free (cmd);
}