summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-05 22:19:10 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-05 22:19:10 +0000
commit4c5f03bee2d18de118156e3a66459b0fd114dc31 (patch)
tree4c25334461a27fb1c5d73c5ade6a5bbb61d28bdb /roff.c
parent59ceaaf6aa64f56ccc82a1659d6fe75139c26c22 (diff)
downloadmandoc-4c5f03bee2d18de118156e3a66459b0fd114dc31.tar.gz
Avoid code duplication in roff_parseln() as suggested by
Christos Zoulas in NetBSD rev. 1.11; i'm even going a step further and making this yet a bit shorter. No functional change.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/roff.c b/roff.c
index 56733186..b1302e02 100644
--- a/roff.c
+++ b/roff.c
@@ -712,19 +712,14 @@ roff_parseln(struct roff *r, int ln, char **bufp,
assert(ROFF_IGN == e || ROFF_CONT == e);
if (ROFF_CONT != e)
return(e);
- if (r->eqn)
- return(eqn_read(&r->eqn, ln, *bufp, pos, offs));
- if (r->tbl)
- return(tbl_read(r->tbl, ln, *bufp, pos));
- return(roff_parsetext(bufp, szp, pos, offs));
- } else if ( ! ctl) {
- if (r->eqn)
- return(eqn_read(&r->eqn, ln, *bufp, pos, offs));
+ }
+ if (r->eqn)
+ return(eqn_read(&r->eqn, ln, *bufp, ppos, offs));
+ if ( ! ctl) {
if (r->tbl)
return(tbl_read(r->tbl, ln, *bufp, pos));
return(roff_parsetext(bufp, szp, pos, offs));
- } else if (r->eqn)
- return(eqn_read(&r->eqn, ln, *bufp, ppos, offs));
+ }
/*
* If a scope is open, go to the child handler for that macro,