Re: [PATCH 19/21] domain_conf.c: modernize virDomainDefControllersParse()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/24/20 8:20 PM, Daniel Henrique Barboza wrote:
The 'error' label is just returning -1, so let's 'return -1'
directly.

Use g_autoptr() with virDomainControllerDefPtr to remove the
need to call virDomainControllerDefFree() in the error path.

There is no need to VIR_FREE(nodes) explictly since 'nodes'
is using g_autofree.

Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
  src/conf/domain_conf.c | 26 ++++++++++----------------
  1 file changed, 10 insertions(+), 16 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux