diff options
author | Richard Hughes <richard@hughsie.com> | 2022-09-09 12:25:24 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-09-09 13:16:21 +0100 |
commit | 0987d6e8b9780893b1736b5e63c6e6703ece0c89 (patch) | |
tree | aae41d2a1047249e613c03f4000f760ed4d48d51 | |
parent | 1c778b7013582bab13a66467e12c7573f615cc8c (diff) | |
download | gusb-0987d6e8b9780893b1736b5e63c6e6703ece0c89.tar.gz |
trivial: Fix the ColorMunki self tests
PVS: Converting type 'gssize' to type 'gboolean' can lead to a loss of high-order bits.
-rw-r--r-- | gusb/gusb-self-test.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gusb/gusb-self-test.c b/gusb/gusb-self-test.c index 2b8e12b..072e3a0 100644 --- a/gusb/gusb-self-test.c +++ b/gusb/gusb-self-test.c @@ -268,13 +268,12 @@ g_usb_device_print_data(const gchar *title, const guchar *data, gsize length) static void g_usb_test_button_pressed_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) { - gboolean ret; + gssize rc; GUsbDeviceAsyncHelper *helper = (GUsbDeviceAsyncHelper *)user_data; g_autoptr(GError) error = NULL; - ret = g_usb_device_interrupt_transfer_finish(G_USB_DEVICE(source_object), res, &error); - - if (!ret) { + rc = g_usb_device_interrupt_transfer_finish(G_USB_DEVICE(source_object), res, &error); + if (rc < 0) { g_error("%s", error->message); return; } |