]> xenbits.xensource.com Git - libvirt.git/commit
storage: Rework ret logic in storageBackendUpdateVolTargetInfo
authorJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 12:46:38 +0000 (07:46 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 18:11:26 +0000 (13:11 -0500)
commitd5aa75e64b8ea998109ae164ef08d541948a0db0
tree720dbd2e522ccb1851d1b3c9997d879331799ce9
parent821dd6d80ad26ab468bda223aca1492c76b9ec9e
storage: Rework ret logic in storageBackendUpdateVolTargetInfo

Rather than overload @ret with trying serve multiple purposes,
let's initialize @ret to -1 and introduce an @rc function return
value that can be used for functions that may return -1 or -2
and only override @ret when rc < 0.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/storage/storage_util.c