Commit e556baac authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

list: remove vlist_copy()

parent 3a4becce
......@@ -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
......@@ -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;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment