(input_is_empty): refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2021-10-23 20:43:38 +03:00
parent 50f08e2194
commit f4a3112d5e

View File

@ -10,7 +10,7 @@
Jakub Jelinek, 1995
Andrej Borsenkow, 1996
Norbert Warmuth, 1997
Andrew Borodin <aborodin@vmail.ru>, 2009-2016
Andrew Borodin <aborodin@vmail.ru>, 2009-2022
This file is part of the Midnight Commander.
@ -1196,7 +1196,13 @@ input_assign_text (WInput * in, const char *text)
gboolean
input_is_empty (const WInput * in)
{
return (in == NULL || in->buffer == NULL || in->buffer[0] == '\0');
if (in == NULL)
return TRUE;
/* if in != NULL, in->buffer must be created */
g_assert (in->buffer != NULL);
return in->buffer[0] == '\0';
}
/* --------------------------------------------------------------------------------------------- */