From 2bdf2e0407d943055ecc595610c75b44b206e7ba Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 5 Jul 2015 16:12:02 +0300 Subject: [PATCH] (edit_goto_cmd): minor optimization and explicit comparision. Signed-off-by: Andrew Borodin --- src/editor/editcmd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 045856039..ec1b5ea24 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -3037,17 +3037,14 @@ edit_goto_cmd (WEdit * edit) f = input_dialog (_("Goto line"), _("Enter line:"), MC_HISTORY_EDIT_GOTO_LINE, first_run ? NULL : INPUT_LAST_TEXT, INPUT_COMPLETE_NONE); - if (!f) - return; - - if (!*f) + if (f == NULL || *f == '\0') { g_free (f); return; } l = strtol (f, &error, 0); - if (*error) + if (*error != '\0') { g_free (f); return; -- 2.11.4.GIT