Skip to content

Commit 17cb542

Browse files
committed
parser common REFACTOR assert to affirm coverity
1 parent f718301 commit 17cb542

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/parser_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ lyd_parser_node_insert(const struct lysc_ext_instance *ext, struct lyd_node *par
525525
}
526526

527527
/* adjust the first sibling pointer */
528+
assert(parent || first_p);
528529
while (!parent && (*first_p)->prev->next) {
529530
*first_p = (*first_p)->prev;
530531
}

0 commit comments

Comments
 (0)