Re: [libvirt-glib 07/37] Implement gvir_config_clock_set_offset

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

 



On Fri, Nov 11, 2011 at 03:47:36PM +0100, Marc-André Lureau wrote:
> 
> On Thu, Nov 10, 2011 at 9:33 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> > ---
> >  libvirt-gconfig/libvirt-gconfig-clock.c |   19 +++++++++++++++++++
> >  libvirt-gconfig/libvirt-gconfig-clock.h |    8 ++++++++
> >  libvirt-gconfig/libvirt-gconfig.sym     |    2 ++
> >  3 files changed, 29 insertions(+), 0 deletions(-)
> >
> > diff --git a/libvirt-gconfig/libvirt-gconfig-clock.c b/libvirt-gconfig/libvirt-gconfig-clock.c
> > index 120d3a6..dc7932d 100644
> > --- a/libvirt-gconfig/libvirt-gconfig-clock.c
> > +++ b/libvirt-gconfig/libvirt-gconfig-clock.c
> > @@ -81,6 +81,25 @@ GVirConfigClock *gvir_config_clock_new_from_xml(const gchar *xml,
> >     return GVIR_CONFIG_CLOCK(object);
> >  }
> >
> > +void gvir_config_clock_set_offset(GVirConfigClock *klock,
> > +                                  GVirConfigClockOffset offset)
> > +{
> > +    GEnumClass *enum_class;
> > +    GEnumValue *enum_value;
> > +    xmlNodePtr node;
> > +
> > +    node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(klock));
> > +    if (node == NULL)
> > +        return;
> > +    enum_class = g_type_class_ref(GVIR_TYPE_CONFIG_CLOCK_OFFSET);
> > +    enum_value = g_enum_get_value(enum_class, offset);
> > +    if (enum_value != NULL)
> > +        xmlNewProp(node, (xmlChar*)"offset", (xmlChar*)enum_value->value_nick);
> > +
> > +    g_type_class_unref(enum_class);
> > +
> > +}
> 
> There is an extra ending line.
> 
> You could rebase so that gvir_config_genum_get_nick() helper is added
> before this function.

Good point, I did this, and this got rid of the extra white line at the
same time.

Christophe

Attachment: pgpwXWX2r8Fal.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]