mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
refactoring: Use the return value of virObjectRef directly
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michal Privoznik
parent
7a665f2451
commit
fd6e3f48ed
@@ -1064,8 +1064,7 @@ qemuMonitorCommonTestNew(virDomainXMLOptionPtr xmlopt,
|
||||
goto error;
|
||||
|
||||
if (vm) {
|
||||
virObjectRef(vm);
|
||||
test->vm = vm;
|
||||
test->vm = virObjectRef(vm);
|
||||
} else {
|
||||
test->vm = virDomainObjNew(xmlopt);
|
||||
if (!test->vm)
|
||||
|
||||
Reference in New Issue
Block a user