diff --git a/src/utils/llist.c b/src/utils/llist.c
index e853001bc45bf7fd9a02f55961930105f89366cf..7d573cfa7449ca1dba229e18702fbac009d688c5 100644 (file)
--- a/src/utils/llist.c
+++ b/src/utils/llist.c
sdb_llist_t *
sdb_llist_clone(sdb_llist_t *list)
{
sdb_llist_t *
sdb_llist_clone(sdb_llist_t *list)
{
- sdb_llist_t *clone;
+ sdb_llist_t *new;
sdb_llist_elem_t *elem;
if (! list)
return NULL;
sdb_llist_elem_t *elem;
if (! list)
return NULL;
- clone = sdb_llist_create();
- if (! clone)
+ new = sdb_llist_create();
+ if (! new)
return NULL;
if (! list->length) {
assert((! list->head) && (! list->tail));
return NULL;
if (! list->length) {
assert((! list->head) && (! list->tail));
- return clone;
+ return new;
}
for (elem = list->head; elem; elem = elem->next) {
}
for (elem = list->head; elem; elem = elem->next) {
- if (sdb_llist_append(clone, elem->obj)) {
- sdb_llist_destroy(clone);
+ if (sdb_llist_append(new, elem->obj)) {
+ sdb_llist_destroy(new);
return NULL;
}
}
return NULL;
}
}
- return clone;
+ return new;
} /* sdb_llist_clone */
void
} /* sdb_llist_clone */
void