From 1b041ad48481de77fd08ea701f3e53dc27816a9f Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 11 Aug 2013 14:05:01 +0400 Subject: [PATCH] (add2panelize_cmd): minor optimization and type accuracy. Signed-off-by: Andrew Borodin --- src/filemanager/panelize.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c index 6606a2063..d96dbddcd 100644 --- a/src/filemanager/panelize.c +++ b/src/filemanager/panelize.c @@ -259,22 +259,17 @@ add2panelize (char *label, char *command) static void add2panelize_cmd (void) { - char *label; - - if (pname->buffer && (*pname->buffer)) + if (pname->buffer != NULL && *pname->buffer != '\0') { + char *label; + label = input_dialog (_("Add to external panelize"), _("Enter command label:"), MC_HISTORY_FM_PANELIZE_ADD, "", INPUT_COMPLETE_NONE); - if (!label) - return; - if (!*label) - { + if (label == NULL || *label == '\0') g_free (label); - return; - } - - add2panelize (label, g_strdup (pname->buffer)); + else + add2panelize (label, g_strdup (pname->buffer)); } }