From 3017015a1ebfbcd47cb443146a0161f97d49cd43 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 11 Jan 2014 22:16:10 +0000 Subject: Remove useless use of strnlen(3). Yuckiness pointed out by deraadt@. --- mdoc_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdoc_validate.c b/mdoc_validate.c index 4e58bde0..fd0db4b6 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1894,7 +1894,7 @@ post_hyph(POST_ARGS) if (MDOC_TEXT != nch->type) continue; cp = nch->string; - if (3 > strnlen(cp, 3)) + if ('\0' == *cp) continue; while ('\0' != *(++cp)) if ('-' == *cp && -- cgit