summaryrefslogtreecommitdiffstats
path: root/common/list.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-08-20 19:05:10 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-08-20 19:05:10 +0000
commitbe52c05a25c0cbadcd605b24d66d0c0b682aee18 (patch)
tree89abaf343d91156a88500480e75e9cdc3247198e /common/list.c
parentafa617e410dad21b496539c2c7e89124294f33ae (diff)
First round of Passkey Release method support
Diffstat (limited to 'common/list.c')
-rw-r--r--common/list.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/list.c b/common/list.c
index 31ae9d35..42d377b7 100644
--- a/common/list.c
+++ b/common/list.c
@@ -99,6 +99,16 @@ struct slist *slist_find(struct slist *list, const void *data,
return NULL;
}
+int slist_length(struct slist *list)
+{
+ int len;
+
+ for (len = 0; list != NULL; list = list->next)
+ len++;
+
+ return len;
+}
+
void slist_foreach(struct slist *list, slist_func_t func, void *user_data)
{
while (list) {