* mdocml: Remove useless use of strnlen(3).
@ 2014-01-11 22:16 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-01-11 22:16 UTC (permalink / raw)
To: source
Log Message:
-----------
Remove useless use of strnlen(3).
Yuckiness pointed out by deraadt@.
Modified Files:
--------------
mdocml:
mdoc_validate.c
Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.201 -r1.202
--- mdoc_validate.c
+++ 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 &&
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-11 22:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-11 22:16 mdocml: Remove useless use of strnlen(3) schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).