Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/yang.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,7 @@ const struct lyd_node *yang_dnode_get_parent(const struct lyd_node *dnode,
return NULL;
}

/* API to check if the given node is last node in the list */
static bool yang_is_last_list_dnode(const struct lyd_node *dnode)
bool yang_is_last_list_dnode(const struct lyd_node *dnode)
{
return (((dnode->next == NULL)
|| (dnode->next
Expand All @@ -803,8 +802,7 @@ static bool yang_is_last_list_dnode(const struct lyd_node *dnode)
!= 0)));
}

/* API to check if the given node is last node in the data tree level */
static bool yang_is_last_level_dnode(const struct lyd_node *dnode)
bool yang_is_last_level_dnode(const struct lyd_node *dnode)
{
const struct lyd_node *parent;
const struct lys_node_list *snode;
Expand Down
5 changes: 5 additions & 0 deletions lib/yang.h
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,11 @@ extern uint32_t yang_get_list_elements_count(const struct lyd_node *node);
/* To get the immediate child of a dnode */
const struct lyd_node *yang_dnode_get_child(const struct lyd_node *dnode);

/* API to check if the given node is last node in the list */
bool yang_is_last_list_dnode(const struct lyd_node *dnode);

/* API to check if the given node is last node in the data tree level */
bool yang_is_last_level_dnode(const struct lyd_node *dnode);

#ifdef __cplusplus
}
Expand Down
Loading