family = AF_INET6;
ipparts = virStringSplit(value->str, "/", 2);
- if (virStringListLength(ipparts) != 2 ||
+ if (virStringListLength((const char * const *)ipparts) != 2 ||
virSocketAddrParse(&ip->address, ipparts[0], family) < 0 ||
virStrToLong_ui(ipparts[1], NULL, 10, &ip->prefix) < 0) {
cells = virStringSplit(line, " ", 0);
- if (cells != NULL && virStringListLength(cells) > 2) {
+ if (cells != NULL &&
+ virStringListLength((const char * const *)cells) > 2) {
if (virStorageBackendSheepdogAddVolume(conn, pool, cells[1]) < 0)
goto cleanup;
}
if (!(tokens = virStringSplit(def->src->srcpool->volume, ":", 0)))
goto cleanup;
- if (virStringListLength(tokens) != 4) {
+ if (virStringListLength((const char * const *)tokens) != 4) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected iscsi volume name '%s'"),
def->src->srcpool->volume);
tokens = virStringSplit(tmp, " ", 0);
- if (virStringListLength(tokens) < 20) {
+ if (virStringListLength((const char * const *)tokens) < 20) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot find start time in %s"),
filename);
if (name && diskTarget)
strings = virStringSplit(name, "[", 2);
- if (virStringListLength(strings) != 2)
+ if (virStringListLength((const char * const *)strings) != 2)
goto cleanup;
if (virStrToLong_uip(strings[1], &suffix, 10, &idx) < 0 ||
}
-size_t virStringListLength(char **strings)
+size_t virStringListLength(const char * const *strings)
{
size_t i = 0;
# define VIR_STRNDUP_QUIET(dst, src, n) virStrndup(&(dst), src, n, false, \
0, NULL, NULL, 0)
-size_t virStringListLength(char **strings);
+size_t virStringListLength(const char * const *strings);
/**
* virVasprintf
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;
}