1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

list: remove vlist_copy()

This commit is contained in:
Steffen Vogel 2019-03-09 00:30:48 +01:00
parent 126fcfa254
commit 3c7b9259a8
2 changed files with 0 additions and 21 deletions

View file

@ -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

View file

@ -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;
}