diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-05-18 17:08:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-05-18 17:08:10 +0000 |
commit | e99f2ebabd7c80fb689af972d6d3212b70bc69dd (patch) | |
tree | 321e8fb6481344222fd85954d2932fefe4f48478 /usr.bin/mandoc | |
parent | ff05e3175e4d5598fb450d248baa2694d6759452 (diff) |
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 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/tree.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.bin/mandoc/tree.c b/usr.bin/mandoc/tree.c index 8d97dfb46e7..69939e268b6 100644 --- a/usr.bin/mandoc/tree.c +++ b/usr.bin/mandoc/tree.c @@ -1,4 +1,4 @@ -/* $Id: tree.c,v 1.16 2011/09/18 10:25:28 schwarze Exp $ */ +/* $Id: tree.c,v 1.17 2013/05/18 17:08:09 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -54,13 +54,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) { @@ -158,9 +156,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); } |