> > On Thu, Apr 05, 2018 at 10:55:13AM +0200, Christophe Fergeau wrote: > > On Thu, Apr 05, 2018 at 04:43:17AM -0400, Frediano Ziglio wrote: > > > > > > > > Currently, red-parse-qxl.c open codes g_memdup() when it needs to > > > > > > "open codes" ? > > > well, currently uses g_malloc+memcpy which can be rewritten with > > > g_memdup. > > > > Yes, doing this can be seen as reimplementing g_memdup, which I'd call > > "open code". I'll reformulate :) > > I changed the full log to > > "Currently, red-parse-qxl.c uses g_malloc+memcpy to duplicate the cursor > data when it could use g_memdup() instead. red-stream-device.c does the > same thing but uses spice_memdup(). This commit makes use of g_memdup() > in both cases so that this memory is consistently allocated through > glib." > > > > > > Christophe > Fine for me, Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel