diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index b199a51a1a..6e585fa0d9 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -1099,7 +1099,7 @@ virStoragePoolMatch(virStoragePoolObjPtr poolobj, int virStoragePoolObjListExport(virConnectPtr conn, - virStoragePoolObjList poolobjs, + virStoragePoolObjListPtr poolobjs, virStoragePoolPtr **pools, virStoragePoolObjListFilter filter, unsigned int flags) @@ -1110,11 +1110,11 @@ virStoragePoolObjListExport(virConnectPtr conn, int ret = -1; size_t i; - if (pools && VIR_ALLOC_N(tmp_pools, poolobjs.count + 1) < 0) + if (pools && VIR_ALLOC_N(tmp_pools, poolobjs->count + 1) < 0) goto cleanup; - for (i = 0; i < poolobjs.count; i++) { - virStoragePoolObjPtr poolobj = poolobjs.objs[i]; + for (i = 0; i < poolobjs->count; i++) { + virStoragePoolObjPtr poolobj = poolobjs->objs[i]; virStoragePoolObjLock(poolobj); if ((!filter || filter(conn, poolobj->def)) && virStoragePoolMatch(poolobj, flags)) { diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h index b65186502c..7c119102b6 100644 --- a/src/conf/virstorageobj.h +++ b/src/conf/virstorageobj.h @@ -191,7 +191,7 @@ virStoragePoolObjUnlock(virStoragePoolObjPtr obj); int virStoragePoolObjListExport(virConnectPtr conn, - virStoragePoolObjList poolobjs, + virStoragePoolObjListPtr poolobjs, virStoragePoolPtr **pools, virStoragePoolObjListFilter filter, unsigned int flags); diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ae96b86f04..31e5e85175 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2647,7 +2647,7 @@ storageConnectListAllStoragePools(virConnectPtr conn, goto cleanup; storageDriverLock(); - ret = virStoragePoolObjListExport(conn, driver->pools, pools, + ret = virStoragePoolObjListExport(conn, &driver->pools, pools, virConnectListAllStoragePoolsCheckACL, flags); storageDriverUnlock(); diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6e4e9a0f3f..46ebdcc96f 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4177,7 +4177,7 @@ testConnectListAllStoragePools(virConnectPtr conn, virCheckFlags(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL, -1); testDriverLock(privconn); - ret = virStoragePoolObjListExport(conn, privconn->pools, pools, + ret = virStoragePoolObjListExport(conn, &privconn->pools, pools, NULL, flags); testDriverUnlock(privconn);