mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-27 13:52:20 +00:00
storage: logical: drop useless if
virStorageBackendLogicalCreateVol contains a piece like: if (vol->target.path != NULL) { /* A target path passed to CreateVol has no meaning */ VIR_FREE(vol->target.path); } The 'if' is useless here, but 'syntax-check' doesn't catch that because of the comment, so drop the 'if'.
This commit is contained in:
parent
b5f57be2a2
commit
53939d58cb
@ -742,10 +742,8 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
|
|||||||
|
|
||||||
vol->type = VIR_STORAGE_VOL_BLOCK;
|
vol->type = VIR_STORAGE_VOL_BLOCK;
|
||||||
|
|
||||||
if (vol->target.path != NULL) {
|
|
||||||
/* A target path passed to CreateVol has no meaning */
|
/* A target path passed to CreateVol has no meaning */
|
||||||
VIR_FREE(vol->target.path);
|
VIR_FREE(vol->target.path);
|
||||||
}
|
|
||||||
|
|
||||||
if (virAsprintf(&vol->target.path, "%s/%s",
|
if (virAsprintf(&vol->target.path, "%s/%s",
|
||||||
pool->def->target.path,
|
pool->def->target.path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user