aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tree.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-18 17:08:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-18 17:08:43 +0000
commitfd975ee52323b5a37569bba943c722004161f5ec (patch)
treeab61ae5d8883adfdc17582f238bef89b03384692 /tree.c
parent6c13812bad464f40c8388ccec3d3944c6d4a2cd5 (diff)
downloadmandoc-fd975ee52323b5a37569bba943c722004161f5ec.tar.gz
mandoc-fd975ee52323b5a37569bba943c722004161f5ec.tar.zst
mandoc-fd975ee52323b5a37569bba943c722004161f5ec.zip
Remove the variable sz because it's invariantly == 0,
along with the dead code testing whether it's positive. Reported by Ulrich Spoerlein <uqs@spoerlein.net>, found by Coverity Scan CID 975717. While here, remove the now unused **params array as well, which Coverity apparently missed, at least it wasn't reported...
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/tree.c b/tree.c
index 1430c737..dccbe37f 100644
--- a/tree.c
+++ b/tree.c
@@ -1,4 +1,4 @@
-/* $Id: tree.c,v 1.47 2011/09/18 14:14:15 schwarze Exp $ */
+/* $Id: tree.c,v 1.48 2013/05/18 17:08:43 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -58,13 +58,11 @@ print_mdoc(const struct mdoc_node *n, int indent)
{
const char *p, *t;
int i, j;
- size_t argc, sz;
- char **params;
+ size_t argc;
struct mdoc_argv *argv;
argv = NULL;
- argc = sz = 0;
- params = NULL;
+ argc = 0;
t = p = NULL;
switch (n->type) {
@@ -162,9 +160,6 @@ print_mdoc(const struct mdoc_node *n, int indent)
printf(" ]");
}
- for (i = 0; i < (int)sz; i++)
- printf(" [%s]", params[i]);
-
printf(" %d:%d\n", n->line, n->pos);
}