From 3c7b9259a8b2884726518b1550dd0c4a2950d99d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 9 Mar 2019 00:30:48 +0100 Subject: [PATCH] list: remove vlist_copy() --- common/include/villas/list.h | 4 ---- common/lib/list.c | 17 ----------------- 2 files changed, 21 deletions(-) diff --git a/common/include/villas/list.h b/common/include/villas/list.h index 295d00fa2..175fe4932 100644 --- a/common/include/villas/list.h +++ b/common/include/villas/list.h @@ -133,10 +133,6 @@ ssize_t vlist_index(struct vlist *l, void *value); /** Extend the list to the given length by filling new slots with given value. */ void vlist_extend(struct vlist *l, size_t len, void *val); -/** Shallow copy a list. */ -int vlist_copy(struct vlist *dst, const struct vlist *src); - - #ifdef __cplusplus } #endif diff --git a/common/lib/list.c b/common/lib/list.c index 4b4418060..a905a3cd1 100644 --- a/common/lib/list.c +++ b/common/lib/list.c @@ -297,20 +297,3 @@ void vlist_extend(struct vlist *l, size_t len, void *val) while (vlist_length(l) < len) vlist_push(l, val); } - -int vlist_copy(struct vlist *dst, const struct vlist *src) -{ - int ret; - - ret = vlist_init(dst); - if (ret) - return ret; - - for (size_t i = 0; i < vlist_length(src); i++) { - void *p = vlist_at(src, i); - - vlist_push(dst, p); - } - - return 0; -}