summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inlines.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/inlines.c b/src/inlines.c
index a43012f..0f1a3d3 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -124,17 +124,16 @@ inline static node_inl* make_simple(int t)
// Utility function used by free_inlines
void splice_into_list(node_inl* e, node_inl* children) {
node_inl * tmp;
- tmp = children;
- if (!tmp) {
- return ;
- }
- // Find last child
- while (tmp->next) {
- tmp = tmp->next;
+ if (children) {
+ tmp = children;
+ // Find last child
+ while (tmp->next) {
+ tmp = tmp->next;
+ }
+ // Splice children into list
+ tmp->next = e->next;
+ e->next = children;
}
- // Splice children into list
- tmp->next = e->next;
- e->next = children;
return ;
}