mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
committed by
Cole Robinson
parent
129c35326a
commit
d1a7102389
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user