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

Re: [virt-tools-list] [libosinfo 3/5] Fix OsinfoMedia::installer-reboots default value



On Wed, Nov 28, 2012 at 03:47:38PM +0200, Zeeshan Ali (Khattak) wrote:
> On Wed, Nov 28, 2012 at 10:58 AM, Christophe Fergeau
> <cfergeau redhat com> wrote:
> > On Wed, Nov 28, 2012 at 01:29:54AM +0200, Zeeshan Ali (Khattak) wrote:
> >> On Wed, Nov 28, 2012 at 12:39 AM, Christophe Fergeau
> >> <cfergeau redhat com> wrote:
> >> > In other words,
> >> > am I introducing a regression,
> >>
> >> Well its not really causing a regression but its not fixing anything either.
> >
> > Definitely not, it just makes the code more consistent (same value for the
> > gobject default property value and in the
> > osinfo_entity_get_value_with_default).
> 
> Not sure how can still state this as a fact while I already told you
> how its not.

gint osinfo_media_get_installer_reboots(OsinfoMedia *media)
{
    g_return_val_if_fail(OSINFO_IS_MEDIA(media), -1);
    g_return_val_if_fail(osinfo_media_get_installer (media), -1);

    return (gint) osinfo_entity_get_param_value_int64_with_default
            (OSINFO_ENTITY(media), OSINFO_MEDIA_PROP_INSTALLER_REBOOTS, 1);
}

'1' *is* the default value, -1 is only returned in case of invalid input
(ie programming error).

Christophe

Attachment: pgpjlBpRtg7YU.pgp
Description: PGP signature


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