Re: [PATCH] Make sure g_object_new receive the correct data

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

 



On Fri, Jun 03, 2016 at 07:16:57AM -0400, Frediano Ziglio wrote:

> > > diff --git a/server/spicevmc.c b/server/spicevmc.c
> > > index b662d94..a863e39 100644
> > > --- a/server/spicevmc.c
> > > +++ b/server/spicevmc.c
> > > @@ -580,8 +580,8 @@ red_char_device_spicevmc_new(SpiceCharDeviceInstance
> > > *sin,
> > >      return g_object_new(RED_TYPE_CHAR_DEVICE_SPICEVMC,
> > >                          "sin", sin,
> > >                          "spice-server", reds,
> > > -                        "client-tokens-interval", 0ULL,
> > > -                        "self-tokens", ~0ULL,
> > > +                        "client-tokens-interval", (guint64) 0ULL,
> > > +                        "self-tokens", (guint64) ~0ULL,
> > >                          "opaque", opaque,
> > >                          NULL);
> > 
> > AFAICT, these are all redundant since the ULL suffice on the constant
> > should already ensure it is passed as a 64-bit type.
> > 
> 
> Not really portable assumption, in theory could be 128 bit or 256 in
> a remote future. I think Gcc already support 128 bit integers.

Haha, this will be the least of our worries if platforms actually
get created using 128 bit or larger integers. It'll make the
switch from 32-bit to 64-bit look like child's play. Pretty much
every piece of software I've seen will break horribly in multiple
ways.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]