source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: in debug messages, truncating strings of excessive lengths is
@ 2014-04-20 22:04 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-04-20 22:04 UTC (permalink / raw)
  To: source

Log Message:
-----------
in debug messages, truncating strings of excessive lengths is actually
a good thing, so cast the return value from sprintf to (void);
this concludes the mandoc sprintf audit

Modified Files:
--------------
    mdocml:
        read.c

Revision Data
-------------
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -Lread.c -Lread.c -u -p -r1.47 -r1.48
--- read.c
+++ read.c
@@ -852,7 +852,7 @@ mandoc_vmsg(enum mandocerr t, struct mpa
 	va_list		 ap;
 
 	va_start(ap, fmt);
-	vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
+	(void)vsnprintf(buf, sizeof(buf), fmt, ap);
 	va_end(ap);
 
 	mandoc_msg(t, m, ln, pos, buf);
--
 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-04-20 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-20 22:04 mdocml: in debug messages, truncating strings of excessive lengths is 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).