summaryrefslogtreecommitdiff
path: root/src/lib-config/get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib-config/get.c')
-rw-r--r--src/lib-config/get.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib-config/get.c b/src/lib-config/get.c
index 98e2a30b..21b97251 100644
--- a/src/lib-config/get.c
+++ b/src/lib-config/get.c
@@ -308,3 +308,17 @@ CONFIG_NODE *config_node_index(CONFIG_NODE *node, int index)
return NULL;
}
+
+/* Returns the next non-comment node in list */
+GSList *config_node_next(GSList *list)
+{
+ list = list->next;
+ while (list != NULL) {
+ CONFIG_NODE *node = list->data;
+
+ if (node->type != NODE_TYPE_COMMENT)
+ break;
+ list = list->next;
+ }
+ return list;
+}