Re: [glib PATCH V5] Add bindings for virDomainRestore*()

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

 



On Tue, Jul 31, 2012 at 12:41:11PM +0200, Zeeshan Ali (Khattak) wrote:
> > +static void restore_domain_from_file_data_free(RestoreDomainFromFileData *data)
> > +{
> > +    g_free(data->filename);
> > +    if (data->custom_conf != NULL)
> > +        g_object_unref(data->custom_conf);
> 
> Actually you can make use of g_clear_object here as you did in
> gvir_domain_save_to_file() patch.

Imo this is a matter of preferences, iirc g_clear_object is a very hammer
performance-wise, so I'm fine with code using g_object_unref directly.

> > +
> > +    if (!gvir_connection_restore_domain_from_file(conn, data->filename,
> > +                                                  data->custom_conf,
> > +                                                  data->flags, &err))
> 
> Each argument on a newline when breaking function call on multiple lines.

I generally favour more balanced blocks, even if this means several
arguments on a break-up line. Just a cosmetic detail, no strong feeling
either, but imo this is more a matter of preference than a hard rule we
should enforce.

Christophe

Attachment: pgpgUjT6lhZDH.pgp
Description: PGP signature

--
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]