Re: [Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-19 Thread Christophe Fergeau
On Wed, Nov 18, 2015 at 06:14:25AM -0500, Frediano Ziglio wrote: > Also the function cast is not portable (I thing can core on x86!). I think this is undefined behaviour indeed, but on the other hand, it's used quite often in the glib/GNOME world, so I don't expect bad things to happen in practice

Re: [Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-18 Thread Frediano Ziglio
> > Your solution is exactly what I had in mind. ACK > > Merged Frediano > > > On Wed, 2015-11-18 at 06:16 -0500, Frediano Ziglio wrote: > > Make sure an allocated buffer is correctly referenced by the marshaller, > > and can't be free and reused by mistake. Simplify the code by using > > G

Re: [Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-18 Thread Jonathon Jongsma
Your solution is exactly what I had in mind. ACK On Wed, 2015-11-18 at 06:16 -0500, Frediano Ziglio wrote: > Make sure an allocated buffer is correctly referenced by the marshaller, > and can't be free and reused by mistake. Simplify the code by using > GSlice > --- > server/display-channel.h

Re: [Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-18 Thread Frediano Ziglio
Make sure an allocated buffer is correctly referenced by the marshaller, and can't be free and reused by mistake. Simplify the code by using GSlice --- server/display-channel.h | 3 -- server/red_worker.c | 116 --- 2 files changed, 30 insertions

Re: [Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-18 Thread Frediano Ziglio
> > On Tue, 2015-11-17 at 16:37 +, Frediano Ziglio wrote: > > From: Marc-André Lureau > > > > Make sure an allocated buffer is correctly referenced by the marshaller, > > and can't be free and reused by mistake. Simplify the code by using > > GSlice > > --- > > server/display-channel.h |

Re: [Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-17 Thread Jonathon Jongsma
On Tue, 2015-11-17 at 16:37 +, Frediano Ziglio wrote: > From: Marc-André Lureau > > Make sure an allocated buffer is correctly referenced by the marshaller, > and can't be free and reused by mistake. Simplify the code by using > GSlice > --- > server/display-channel.h | 3 -- > server/red_

[Spice-devel] [PATCH 8/9] worker: simplify RedCompressBuf

2015-11-17 Thread Frediano Ziglio
From: Marc-André Lureau Make sure an allocated buffer is correctly referenced by the marshaller, and can't be free and reused by mistake. Simplify the code by using GSlice --- server/display-channel.h | 3 -- server/red_worker.c | 111 +++ 2 fil