mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(input_is_empty): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
50f08e2194
commit
f4a3112d5e
@ -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';
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user