(add2panelize_cmd): minor optimization and type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-08-11 14:05:01 +04:00
parent 5e81b4be89
commit 1b041ad484

View File

@ -259,22 +259,17 @@ add2panelize (char *label, char *command)
static void static void
add2panelize_cmd (void) add2panelize_cmd (void)
{ {
char *label; if (pname->buffer != NULL && *pname->buffer != '\0')
if (pname->buffer && (*pname->buffer))
{ {
char *label;
label = input_dialog (_("Add to external panelize"), label = input_dialog (_("Add to external panelize"),
_("Enter command label:"), MC_HISTORY_FM_PANELIZE_ADD, "", _("Enter command label:"), MC_HISTORY_FM_PANELIZE_ADD, "",
INPUT_COMPLETE_NONE); INPUT_COMPLETE_NONE);
if (!label) if (label == NULL || *label == '\0')
return;
if (!*label)
{
g_free (label); g_free (label);
return; else
} add2panelize (label, g_strdup (pname->buffer));
add2panelize (label, g_strdup (pname->buffer));
} }
} }