diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-08-20 19:05:10 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-08-20 19:05:10 +0000 |
commit | be52c05a25c0cbadcd605b24d66d0c0b682aee18 (patch) | |
tree | 89abaf343d91156a88500480e75e9cdc3247198e /common/list.c | |
parent | afa617e410dad21b496539c2c7e89124294f33ae (diff) |
First round of Passkey Release method support
Diffstat (limited to 'common/list.c')
-rw-r--r-- | common/list.c | 10 |
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) { |