From 4690a796b3a9cd2ed9769323c29d5e442d4be21f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 25 Jul 2009 16:03:03 +0000 Subject: Patches and results of LLVM static analysis (thanks uqs@sporlein.net). --- mdoc_macro.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index b156f0bd..97b157be 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.26 2009/07/24 12:17:25 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.27 2009/07/25 16:03:03 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -681,7 +681,7 @@ blk_exp_close(MACRO_PROT_ARGS) mdoc->next = MDOC_NEXT_CHILD; } - for (lastarg = ppos, flushed = j = 0; ; j++) { + for (flushed = j = 0; ; j++) { lastarg = *pos; if (j == maxargs && ! flushed) { @@ -760,7 +760,7 @@ in_line(MACRO_PROT_ARGS) break; } - for (la = ppos, arg = NULL;; ) { + for (arg = NULL;; ) { la = *pos; c = mdoc_argv(mdoc, line, tok, &arg, pos, buf); @@ -1046,7 +1046,7 @@ blk_part_imp(MACRO_PROT_ARGS) /* XXX - no known argument macros. */ - for (lastarg = ppos;; ) { + for (;;) { lastarg = *pos; c = mdoc_args(mdoc, line, pos, buf, tok, &p); assert(ARGS_PHRASE != c); @@ -1107,7 +1107,6 @@ blk_part_exp(MACRO_PROT_ARGS) int lastarg, flushed, j, c, maxargs; char *p; - lastarg = ppos; flushed = 0; /* @@ -1243,7 +1242,7 @@ in_line_argn(MACRO_PROT_ARGS) break; } - for (lastarg = ppos, arg = NULL;; ) { + for (arg = NULL;; ) { lastarg = *pos; c = mdoc_argv(mdoc, line, tok, &arg, pos, buf); -- cgit v1.2.3-56-ge451