diff options
Diffstat (limited to 'common/strlist.c')
-rw-r--r-- | common/strlist.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/strlist.c b/common/strlist.c index 967509c56..9bd6195f9 100644 --- a/common/strlist.c +++ b/common/strlist.c @@ -221,3 +221,13 @@ strlist_find (strlist_t haystack, const char *needle) return haystack; return NULL; } + +int +strlist_length (strlist_t list) +{ + int i; + for (i = 0; list; list = list->next) + i ++; + + return i; +} |