virStringListLength: Ensure const correctness

The virStringListLength function does not ever modify the passed
string list. It merely counts the items in it. Make sure that we
reflect this bit in the function header.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

(crobinso: fix up spacing and squash in sheepdog bit suggested
 by Andrea)
This commit is contained in:
Michal Privoznik
2016-02-09 18:18:49 +01:00
committed by Cole Robinson
parent 129c35326a
commit d1a7102389
8 changed files with 10 additions and 9 deletions

View File

@@ -336,10 +336,10 @@ testStringSearch(const void *opaque)
goto cleanup;
}
if (virStringListLength(matches) != nmatches) {
if (virStringListLength((const char * const *)matches) != nmatches) {
fprintf(stderr, "expected %zu matches on %s but got %zd matches\n",
data->expectNMatches, data->str,
virStringListLength(matches));
virStringListLength((const char * const *)matches));
goto cleanup;
}