[Spice-devel] [PATCH spice-gtk 2/3] usbutil: Add a spice_usb_util_get_device_strings helper function

Marc-André Lureau marcandre.lureau at gmail.com
Sun Feb 12 13:39:22 PST 2012


On Thu, Feb 9, 2012 at 2:30 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> +void spice_usb_util_get_device_strings(int bus, int address,
> +                                       int vendor_id, int product_id,
> +                                       gchar **manufacturer, gchar **product)
> +{

g_return_if_fail(manufacturer != NULL);
g_return_if_fail(product != NULL);


> +    *manufacturer = NULL;
> +    *product = NULL;
> +

It's a good habit to very the pointer arguments before accessing them
in public functions.

-- 
Marc-André Lureau


More information about the Spice-devel mailing list