[PATCH 19/21] domain_conf.c: modernize virDomainDefControllersParse()
Michal Privoznik
mprivozn at redhat.com
Tue Dec 1 18:46:48 UTC 2020
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 at gmail.com>
> ---
> src/conf/domain_conf.c | 26 ++++++++++----------------
> 1 file changed, 10 insertions(+), 16 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
Michal
More information about the libvir-list
mailing list