X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fusb.c;h=6bd9e8182960cc330164350ccc4f37facd8a7aea;hp=b453c04c8218d93a9ca22eff23f40e4f0c6e79c6;hb=084d6b927163fb0881941ad13014e07a6a5e7a77;hpb=00f0016cc361008cd9eb2e52fd2a01f333c0e3cd diff --git a/src/usb.c b/src/usb.c index b453c04c..6bd9e818 100644 --- a/src/usb.c +++ b/src/usb.c @@ -38,7 +38,6 @@ typedef int libusb_os_handle; #endif /** Custom GLib event source for libusb I/O. - * @internal */ struct usb_source { GSource base; @@ -139,7 +138,7 @@ static gboolean usb_source_dispatch(GSource *source, sr_err("Callback not set, cannot dispatch event."); return G_SOURCE_REMOVE; } - keep = (*(sr_receive_data_callback)callback)(-1, revents, user_data); + keep = (*SR_RECEIVE_DATA_CALLBACK(callback))(-1, revents, user_data); if (G_LIKELY(keep) && G_LIKELY(!g_source_is_destroyed(source))) { if (usource->timeout_us >= 0) @@ -456,7 +455,7 @@ SR_PRIV int usb_source_add(struct sr_session *session, struct sr_context *ctx, if (!source) return SR_ERR; - g_source_set_callback(source, (GSourceFunc)cb, cb_data, NULL); + g_source_set_callback(source, G_SOURCE_FUNC(cb), cb_data, NULL); ret = sr_session_source_add_internal(session, ctx->libusb_ctx, source); g_source_unref(source); @@ -509,7 +508,7 @@ SR_PRIV int usb_get_port_path(libusb_device *dev, char *path, int path_len) } /** - * Check the USB configuration to determine if this device has a given + * Check the USB configuration to determine if this device has a given * manufacturer and product string. * * @return TRUE if the device's configuration profile strings