storage: No need to check ret after VIR_APPEND_ELEMENT

Generates a false positive for Coverity, but it turns out there's no need
to check ret == -1 since if VIR_APPEND_ELEMENT is successful, the local
vol pointer is cleared anyway.

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2016-02-19 14:03:16 -05:00
parent 4e87164306
commit 5430ee3aa6
2 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ virStorageBackendLogicalMakeVol(char **const groups,
ret = 0;
cleanup:
if (is_new_vol && (ret == -1))
if (is_new_vol)
virStorageVolDefFree(vol);
return ret;
}

View File

@ -161,7 +161,7 @@ virStorageBackendZFSParseVol(virStoragePoolObjPtr pool,
cleanup:
virStringFreeList(tokens);
virStringFreeList(name_tokens);
if (is_new_vol && (ret == -1))
if (is_new_vol)
virStorageVolDefFree(volume);
return ret;
}