summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 6c84ff24..74c6b953 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -480,7 +480,8 @@ mdoc_block_alloc(struct mdoc *mdoc, int line, int pos,
p = node_alloc(mdoc, line, pos, tok, MDOC_BLOCK);
if (NULL == p)
return(0);
- if ((p->args = args))
+ p->args = args;
+ if (p->args)
(args->refcnt)++;
return(node_append(mdoc, p));
}
@@ -495,7 +496,8 @@ mdoc_elem_alloc(struct mdoc *mdoc, int line, int pos,
p = node_alloc(mdoc, line, pos, tok, MDOC_ELEM);
if (NULL == p)
return(0);
- if ((p->args = args))
+ p->args = args;
+ if (p->args)
(args->refcnt)++;
return(node_append(mdoc, p));
}