aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/eqn.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-20 19:40:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-20 19:40:13 +0000
commitc0c47ffe49a70fb77831194f625f593bd29c449e (patch)
treedb8c1dbd3c3052a39baeff9ada43ecce15282496 /eqn.c
parent29cecee7ff6894517a32d929aecee283bb85058c (diff)
downloadmandoc-c0c47ffe49a70fb77831194f625f593bd29c449e.tar.gz
mandoc-c0c47ffe49a70fb77831194f625f593bd29c449e.tar.zst
mandoc-c0c47ffe49a70fb77831194f625f593bd29c449e.zip
make sure static buffers for snprintf(3) are large enough
and cast snprintf return value to (void) where they are
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eqn.c b/eqn.c
index 015d9eec..12b00e51 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.40 2014/04/20 16:46:04 schwarze Exp $ */
+/* $Id: eqn.c,v 1.41 2014/04/20 19:40:13 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -628,7 +628,7 @@ eqn_box(struct eqn_node *ep, struct eqn_box *last)
for (i = 0; i < (int)EQNSYM__MAX; i++)
if (EQNSTREQ(&eqnsyms[i].str, start, sz)) {
sym[63] = '\0';
- snprintf(sym, 62, "\\[%s]", eqnsyms[i].sym);
+ (void)snprintf(sym, 62, "\\[%s]", eqnsyms[i].sym);
bp->text = mandoc_strdup(sym);
return(EQN_OK);
}