summaryrefslogtreecommitdiffstats
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
commite5b75f0314268a74331da39f117243e01260176d (patch)
tree8f2daa0b0f6f1a3d88971d454ef0626e98e11dd7
parentb9c640af8a3c806dde7a13727dab3d1715d35536 (diff)
downloadmandoc-e5b75f0314268a74331da39f117243e01260176d.tar.gz
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...
-rw-r--r--tree.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tree.c b/tree.c
index cb443b73..4b38111d 100644
--- a/tree.c
+++ b/tree.c
@@ -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);
}