Re: [libvirt PATCH 12/13] conf: use g_new0

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

 



> diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c
> index 1db3dc69e2..3183078195 100644
> --- a/src/conf/virnetworkportdef.c
> +++ b/src/conf/virnetworkportdef.c
> @@ -95,8 +95,8 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt)
>      g_autofree char *managed = NULL;
>      g_autofree char *driver = NULL;
>  
> -    if (VIR_ALLOC(def) < 0)
> -        return NULL;
> +    def = g_new0(virNetworkPortDef,
> +                 1);

Make ^these a single line.




[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