mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-05 01:44:22 +03:00
(edit_goto_cmd): minor optimization and explicit comparision.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
bbd5f8dd35
commit
2bdf2e0407
@ -3037,17 +3037,14 @@ edit_goto_cmd (WEdit * edit)
|
|||||||
|
|
||||||
f = input_dialog (_("Goto line"), _("Enter line:"), MC_HISTORY_EDIT_GOTO_LINE,
|
f = input_dialog (_("Goto line"), _("Enter line:"), MC_HISTORY_EDIT_GOTO_LINE,
|
||||||
first_run ? NULL : INPUT_LAST_TEXT, INPUT_COMPLETE_NONE);
|
first_run ? NULL : INPUT_LAST_TEXT, INPUT_COMPLETE_NONE);
|
||||||
if (!f)
|
if (f == NULL || *f == '\0')
|
||||||
return;
|
|
||||||
|
|
||||||
if (!*f)
|
|
||||||
{
|
{
|
||||||
g_free (f);
|
g_free (f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = strtol (f, &error, 0);
|
l = strtol (f, &error, 0);
|
||||||
if (*error)
|
if (*error != '\0')
|
||||||
{
|
{
|
||||||
g_free (f);
|
g_free (f);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user