From 5a614b48d4e480e6aecbb9f6257de42dee05e3ae Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 16 Oct 2011 12:20:34 +0000 Subject: 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@. --- man_validate.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'man_validate.c') diff --git a/man_validate.c b/man_validate.c index 3a178e65..28352a0c 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.75 2011/09/06 17:53:50 kristaps Exp $ */ +/* $Id: man_validate.c,v 1.76 2011/10/16 12:20:34 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -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]; -- cgit v1.2.3