mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
storage_driver.c: remove two dead stores to "backend"
* src/storage_driver.c (storagePoolGetInfo, storagePoolDefine): Remove variable, backend, since its value was never used.
This commit is contained in:
parent
46b80ce25e
commit
6f91c5b5ea
@ -519,13 +519,12 @@ storagePoolDefine(virConnectPtr conn,
|
|||||||
virStoragePoolDefPtr def;
|
virStoragePoolDefPtr def;
|
||||||
virStoragePoolObjPtr pool = NULL;
|
virStoragePoolObjPtr pool = NULL;
|
||||||
virStoragePoolPtr ret = NULL;
|
virStoragePoolPtr ret = NULL;
|
||||||
virStorageBackendPtr backend;
|
|
||||||
|
|
||||||
storageDriverLock(driver);
|
storageDriverLock(driver);
|
||||||
if (!(def = virStoragePoolDefParseString(conn, xml)))
|
if (!(def = virStoragePoolDefParseString(conn, xml)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((backend = virStorageBackendForType(def->type)) == NULL)
|
if (virStorageBackendForType(def->type) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(pool = virStoragePoolObjAssignDef(conn, &driver->pools, def)))
|
if (!(pool = virStoragePoolObjAssignDef(conn, &driver->pools, def)))
|
||||||
@ -847,7 +846,6 @@ storagePoolGetInfo(virStoragePoolPtr obj,
|
|||||||
virStoragePoolInfoPtr info) {
|
virStoragePoolInfoPtr info) {
|
||||||
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
|
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
|
||||||
virStoragePoolObjPtr pool;
|
virStoragePoolObjPtr pool;
|
||||||
virStorageBackendPtr backend;
|
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
storageDriverLock(driver);
|
storageDriverLock(driver);
|
||||||
@ -860,7 +858,7 @@ storagePoolGetInfo(virStoragePoolPtr obj,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((backend = virStorageBackendForType(pool->def->type)) == NULL)
|
if (virStorageBackendForType(pool->def->type) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
memset(info, 0, sizeof(virStoragePoolInfo));
|
memset(info, 0, sizeof(virStoragePoolInfo));
|
||||||
|
Loading…
Reference in New Issue
Block a user