aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org>2017-11-04 18:42:04 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org>2017-11-04 18:42:04 +0100
commit5b88a2f7a9adb6ea181f897fb64485b56be08e80 (patch)
tree80a247614b2ef54aeab45a57e03ed65c076b61cb /colorize.c
parente5d940c200f43f3698b12ee40a2fa3ceb9707b8d (diff)
downloadcolorize-5b88a2f7a9adb6ea181f897fb64485b56be08e80.tar.gz
colorize-5b88a2f7a9adb6ea181f897fb64485b56be08e80.tar.bz2
Make strlen() assertions more explicit
Diffstat (limited to 'colorize.c')
-rw-r--r--colorize.c4
1 files 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;