diff options
author | Neal H. Walfield <[email protected]> | 2015-09-18 23:25:54 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-09-18 23:26:48 +0000 |
commit | 8499c4f84a664bedbdf5a5689cb02420909f1968 (patch) | |
tree | fc234f6a7b8df59b428ecd264932c014119e8c34 /common/strlist.c | |
parent | gpgconf: Change displayed name of Dirmngr to "Network Manager". (diff) | |
download | gnupg-8499c4f84a664bedbdf5a5689cb02420909f1968.tar.gz gnupg-8499c4f84a664bedbdf5a5689cb02420909f1968.zip |
common: Add new function strlist_length.
* common/strlist.c (strlist_length): New function.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
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; +} |