summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man_macro.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/man_macro.c b/man_macro.c
index e320a6e2..10611669 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -120,6 +120,9 @@ man_unscope(struct man *m, const struct man_node *to,
assert(to);
+ assert(MAN_ROOT != m->last->type);
+ m->next = MAN_NEXT_SIBLING;
+
/* LINTED */
while (m->last != to) {
/*
@@ -140,9 +143,6 @@ man_unscope(struct man *m, const struct man_node *to,
if ( ! man_valid_post(m))
return(0);
- m->next = MAN_ROOT == m->last->type ?
- MAN_NEXT_CHILD : MAN_NEXT_SIBLING;
-
return(1);
}
@@ -428,6 +428,9 @@ in_line_eoln(MACRO_PROT_ARGS)
assert( ! (MAN_SCOPED & man_macros[tok].flags));
m->flags |= MAN_ILINE;
}
+
+ assert(MAN_ROOT != m->last->type);
+ m->next = MAN_NEXT_SIBLING;
/*
* Rewind our element scope. Note that when TH is pruned, we'll
@@ -453,9 +456,6 @@ in_line_eoln(MACRO_PROT_ARGS)
if (m->last->type != MAN_ROOT && ! man_valid_post(m))
return(0);
- m->next = MAN_ROOT == m->last->type ?
- MAN_NEXT_CHILD : MAN_NEXT_SIBLING;
-
return(1);
}