On Wed, Apr 27, 2011 at 02:06:48PM +0200, Christophe Fergeau wrote: > On Wed, Apr 27, 2011 at 07:27:18AM -0400, Marc-André Lureau wrote: > > Sigh.. i would prefer to avoid ASSERT, and instead use return_val_if_fail() > > or so. > > > > That's probably why I didn't add it in the first place. > > The old code would crash anyway when being passed NULL, that's why I > suggested a hard ASSERT here, to crash at the same place instead of getting > different failures that might be harder to diagnose later on. A > g_return_val_if_fail might work, but there is no such thing in spice/ :)
Thinking some more about it, if the patch wasn't written as a fix for a crash when spice_memdup was passed NULL, I'm ok with ack'ing the 1st version too. Christophe
pgp6QE2YWrkyI.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel