Re: [PATCH 1/4] virQEMUDriverConfigLoadProcessEntry: use VIR_AUTOFREE

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

 



On Mon, Jan 21, 2019 at 02:56:14PM +0100, Ján Tomko wrote:
> Switch the function to use VIR_AUTOFREE and VIR_AUTOPTR macros
> to get rid of the cleanup section.
>
> Requested-by: John Ferlan <jferlan@xxxxxxxxxx>
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  src/qemu/qemu_conf.c | 45 +++++++++++++++++++--------------------------
>  1 file changed, 19 insertions(+), 26 deletions(-)
>
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 256aad2c0b..fc7101904e 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -642,15 +642,14 @@ static int
>  virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
>                                      virConfPtr conf)
>  {
> -    char *stdioHandler = NULL;
> -    char **hugetlbfs = NULL;
> -    char *corestr = NULL;
> -    int ret = -1;
> +    VIR_AUTOFREE(char *) stdioHandler = NULL;
> +    VIR_AUTOPTR(virString) hugetlbfs = NULL;

Minor nit pick, can ^this one be moved 1 up or 1 down?

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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