diff options
author | pgen <p.gen.progs@gmail.com> | 2017-12-26 23:04:59 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2017-12-26 23:04:59 +0100 |
commit | 857d7cf03d923072e4b3020da23462f986693152 (patch) | |
tree | 859d286f3baee5f1b83ac7d7acb08309b75d67cf | |
parent | e4ba25136c385796f42430008ff3347a4f8c1209 (diff) |
Clarify the isempty function code and description
-rw-r--r-- | smenu.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |