[Spice-devel] [PATCH spice-gtk 13/14] usb: do not return GError on programmer pre-condition checks

Marc-André Lureau marcandre.lureau at gmail.com
Thu Apr 24 08:33:34 PDT 2014


On Wed, Apr 23, 2014 at 11:43 PM, Jonathon Jongsma <jjongsma at redhat.com>wrote:

> Why return FALSE without setting error?  Doesn't that violate the contract
> for initable? From the docs:
>
>   Returns: TRUE if successful. If an error has occurred, this function
> will return FALSE and set error appropriately if present.
>

Those are programmer pre-condition checks. They should be unreachable at
runtime. Anyway, they can safely be removed or moved to
spice_usb_device_manager_get(), which is how I changed the patch.


-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140424/a146fb58/attachment-0001.html>


More information about the Spice-devel mailing list