diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-04-20 22:03:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-04-20 22:03:41 +0000 |
commit | a7c0e52de8fcd1a57c2030decf41ba7b8b339d6e (patch) | |
tree | 97573ac9106a10608ba6734185c3ad0fbfd314e3 | |
parent | dfc691e80928339783587845ab82af2504714f30 (diff) |
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
-rw-r--r-- | usr.bin/mandoc/read.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index 97e1d067b23..9562593e680 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.25 2014/04/20 16:44:44 schwarze Exp $ */ +/* $Id: read.c,v 1.26 2014/04/20 22:03:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -827,7 +827,7 @@ mandoc_vmsg(enum mandocerr t, struct mparse *m, 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); |