summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2017-12-26 23:04:59 +0100
committerpgen <p.gen.progs@gmail.com>2017-12-26 23:04:59 +0100
commit857d7cf03d923072e4b3020da23462f986693152 (patch)
tree859d286f3baee5f1b83ac7d7acb08309b75d67cf
parente4ba25136c385796f42430008ff3347a4f8c1209 (diff)
Clarify the isempty function code and description
-rw-r--r--smenu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/smenu.c b/smenu.c
index 235a52f..024403b 100644
--- a/smenu.c
+++ b/smenu.c
@@ -1985,13 +1985,13 @@ rtrim(char * str, const char * trim_str, size_t min)
str[--len] = '\0';
}
-/* ============================================ */
-/* Returns 1 if a string is only made of spaces */
-/* ============================================ */
+/* ===================================================== */
+/* Returns 1 if a string is empty or only made of spaces */
+/* ===================================================== */
static int
isempty(const char * s)
{
- while (*s)
+ while (*s != '\0')
{
if (!isspace(*s))
return 0;