[Spice-devel] [PATCH spice-server 4/6] red-channel-client: Move incoming/ougoing initialization to constructor
Christophe Fergeau
cfergeau at redhat.com
Wed Nov 2 15:50:38 UTC 2016
On Mon, Oct 31, 2016 at 06:10:59AM -0400, Frediano Ziglio wrote:
> >
> > On Fri, Oct 28, 2016 at 11:59:54AM +0100, Frediano Ziglio wrote:
> > > These fields need just channel to be set to be initialized.
> > > Move their initialization to constructor to make sure
> > > they are initialized as soon as possible.
> >
> > Why?
> >
>
>
> Read previous reply to "red-channel-client: Init pipe field during init".
> To sum up current code could lead to use of not initialized fields due to order
> changes introduced.
This should be in the commit log.
>
> > Not related to this patch, but I'm not sure initializing pos and size to
> > 0 is required, 'priv' will be memset to 0 upon creation.
> >
> > Christophe
> >
>
> I just moved the code.
> I think would be better to remove with another patch if you like to.
Yeah, as I said, not related to this patch :) Not even important, just
something useful to have in mind for future code/reviews.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161102/f5282058/attachment.sig>
More information about the Spice-devel
mailing list