summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-10-12 07:54:47 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-10-12 07:54:47 +0000
commitb86c496307b2b284fabb1a33490163a78aeeb831 (patch)
tree4f0d478f1dec33ea0719b1a1aed035598ed68c0c /common
parent351ec5438c38eb319ff861f1498fa0dacb747e60 (diff)
Remove slist_insert_before as it is not needed anymore
Diffstat (limited to 'common')
-rw-r--r--common/list.c30
-rw-r--r--common/list.h2
2 files changed, 0 insertions, 32 deletions
diff --git a/common/list.c b/common/list.c
index 65d83295..827f1789 100644
--- a/common/list.c
+++ b/common/list.c
@@ -70,36 +70,6 @@ struct slist *slist_prepend(struct slist *list, void *data)
return entry;
}
-struct slist *slist_insert_before(struct slist *list, struct slist *sibling, void *data)
-{
- struct slist *entry, *prev, *cur;
-
- entry = malloc(sizeof(struct slist));
- if (!entry)
- return list;
-
- entry->data = data;
- entry->next = NULL;
-
- if (!list)
- return entry;
-
- for (cur = list, prev = NULL; cur != NULL; prev = cur, cur = prev->next) {
- if (cur == sibling)
- break;
- }
-
- if (!prev) {
- entry->next = list;
- return entry;
- }
-
- entry->next = prev->next;
- prev->next = entry;
-
- return list;
-}
-
struct slist *slist_insert_sorted(struct slist *list, void *data, cmp_func_t cmp_func)
{
struct slist *tmp, *prev, *entry;
diff --git a/common/list.h b/common/list.h
index 9868a79a..c11424ca 100644
--- a/common/list.h
+++ b/common/list.h
@@ -37,8 +37,6 @@ struct slist *slist_append(struct slist *list, void *data);
struct slist *slist_prepend(struct slist *list, void *data);
-struct slist *slist_insert_before(struct slist *list, struct slist *sibling, void *data);
-
struct slist *slist_insert_sorted(struct slist *list, void *data, cmp_func_t cmp_func);
struct slist *slist_remove(struct slist *list, void *data);