From 5b88a2f7a9adb6ea181f897fb64485b56be08e80 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sat, 4 Nov 2017 18:42:04 +0100 Subject: Make strlen() assertions more explicit --- colorize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colorize.c b/colorize.c index 49879c5..0cf44cb 100644 --- a/colorize.c +++ b/colorize.c @@ -1448,8 +1448,8 @@ has_color_name (const char *str, const char *name) { char *p; - assert (strlen (str)); - assert (strlen (name)); + assert (strlen (str) > 0); + assert (strlen (name) > 0); if (!(*str == *name || *str == toupper (*name))) return false; -- cgit v1.2.3