[Spice-devel] [cacard 6/7] cac-aca: Favour g_return_val_if_fail over g_assert

Christophe Fergeau cfergeau at redhat.com
Fri Aug 10 10:59:38 UTC 2018


On Fri, Aug 10, 2018 at 05:18:15AM -0400, Frediano Ziglio wrote:
> > @@ -1014,7 +1014,8 @@ static struct simpletlv_member aca_properties[1] = {
> >  static struct simpletlv_member *
> >  cac_aca_get_properties(size_t *properties_len)
> >  {
> > -    g_assert_nonnull(properties_len);
> > +    /* FIXME: callers don't handle NULL return value, but it can't happen
> > anyway */
> > +    g_return_val_if_fail(properties_len != NULL, NULL);
> > 
> 
> This new regression does not make sense to me.

Ah, the FIXME: was a note for me, I did not mean to keep this hunk
unchanged in the patch I send for review, but I forgot to change it :)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180810/4c728196/attachment.sig>


More information about the Spice-devel mailing list