Fixed sign-compare warnings.
authorArmin Novak <armin.novak@thincast.com>
Thu, 7 Feb 2019 14:09:47 +0000 (15:09 +0100)
committerArmin Novak <armin.novak@thincast.com>
Fri, 5 Apr 2019 07:14:35 +0000 (09:14 +0200)
channels/urbdrc/client/libusb/libusb_udevice.c

index a8e5444..316736e 100644 (file)
@@ -631,7 +631,7 @@ static int udev_get_hub_handle(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_numb
                        }
                        while (p1 != NULL);
 
-                       if ((p2 - sysfs_path) < (strlen(sysfs_path) - 2U))
+                       if ((size_t)((p2 - sysfs_path) + 2U) < strlen(sysfs_path))
                        {
                                p1 = (char*) sysfs_path;