1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common: Add new function strlist_length.

* common/strlist.c (strlist_length): New function.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-09-19 01:25:54 +02:00
parent 819bba75aa
commit 8499c4f84a
2 changed files with 11 additions and 0 deletions

View file

@ -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;
}