summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-10-16 12:20:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-10-16 12:20:34 +0000
commit855d59ab582ff06a37b6864586bd5d5aa61018a2 (patch)
treeec50e0edd6a8458edd410b827c40dbf7d4a7b786 /man_validate.c
parent14297a71223fc5ff079a17f339ddbf603eaca3bf (diff)
downloadmandoc-855d59ab582ff06a37b6864586bd5d5aa61018a2.tar.gz
Remove a bunch of useless assignments,
and assert that print_bvspace cannot be called on NULL pointers. No change in behaviour, none of these were bugs, but the code becomes easier to understand. Based on a clang report posted by joerg@; ok kristaps@.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/man_validate.c b/man_validate.c
index 39380fa3..587436c4 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -213,12 +213,12 @@ check_text(CHKARGS)
{
char *cp, *p;
- cp = p = n->string;
- for (cp = p; NULL != (p = strchr(p, '\t')); p++) {
- if (MAN_LITERAL & m->flags)
- continue;
+ if (MAN_LITERAL & m->flags)
+ return;
+
+ cp = n->string;
+ for (p = cp; NULL != (p = strchr(p, '\t')); p++)
man_pmsg(m, n->line, (int)(p - cp), MANDOCERR_BADTAB);
- }
}
#define INEQ_DEFINE(x, ineq, name) \
@@ -474,7 +474,6 @@ post_UC(CHKARGS)
const char *p, *s;
n = n->child;
- n = m->last->child;
if (NULL == n || MAN_TEXT != n->type)
p = bsd_versions[0];