summaryrefslogtreecommitdiff
path: root/conf/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf/conf.c')
-rw-r--r--conf/conf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/conf/conf.c b/conf/conf.c
index 5bdeece2..4b605b36 100644
--- a/conf/conf.c
+++ b/conf/conf.c
@@ -377,3 +377,18 @@ cfg_strdup(char *c)
memcpy(z, c, l);
return z;
}
+
+
+void
+cfg_copy_list(list *dest, list *src, unsigned node_size)
+{
+ node *dn, *sn;
+
+ init_list(dest);
+ WALK_LIST(sn, *src)
+ {
+ dn = cfg_alloc(node_size);
+ memcpy(dn, sn, node_size);
+ add_tail(dest, dn);
+ }
+}