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

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

 



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@xxxxxxxxxx> 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@xxxxxxxxxx> 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: pgpHf8U1JhLz8.pgp
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux