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

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



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: pgpn42vaLQMli.pgp
Description: PGP signature


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