summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-01-11 22:16:03 +0000
committerschwarze <schwarze@openbsd.org>2014-01-11 22:16:03 +0000
commitb7e2b14ea0feb6e7a8089f2197178d1340cecabf (patch)
tree24c403e037dc65d951c35e82ef84cd37dfa854c8
parenttest key for during the 5.5-beta sequence (diff)
downloadwireguard-openbsd-b7e2b14ea0feb6e7a8089f2197178d1340cecabf.tar.xz
wireguard-openbsd-b7e2b14ea0feb6e7a8089f2197178d1340cecabf.zip
Remove useless use of strnlen(3).
Yuckiness pointed out by deraadt@.
-rw-r--r--usr.bin/mandoc/mdoc_validate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index b744882e788..2ad5c5ff6b5 100644
--- a/usr.bin/mandoc/mdoc_validate.c
+++ b/usr.bin/mandoc/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.119 2014/01/07 09:10:58 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.120 2014/01/11 22:16:03 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1890,7 +1890,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 &&