[Spice-commits] src/usbutil.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Apr 17 08:58:00 UTC 2021
src/usbutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2fca24cc239237c3d1dc82d381eb67df413ed049
Author: Bastien Orivel <bastien.orivel at diateam.net>
Date: Fri Apr 16 13:57:20 2021 +0200
Fix parsing the usbids file
This fixes a regression from 032ca202f839fe1c49cddfd2b0459f9fecc23c86
where a check on whether the usbids file contained anything but the
wrong variable was checked. This is visible on windows when trying to
share a USB device as devices won't get named based on the usbids file.
Same thing on linux if we can't read the name from the sysfs.
`usbids_vendor_info` is only initialized to something not NULL after it
was checked to be different from NULL which is obviously wrong. The
patch wanted to check that the `usbids_vendor_count` was different from
0 instead.
Acked-by: Frediano Ziglio <freddy77 at gmail.com>
diff --git a/src/usbutil.c b/src/usbutil.c
index f29302b..b34739e 100644
--- a/src/usbutil.c
+++ b/src/usbutil.c
@@ -113,7 +113,7 @@ static gboolean spice_usbutil_parse_usbids(gchar *path)
usbids_vendor_count++;
}
- if (usbids_vendor_info == 0 || product_count == 0) {
+ if (usbids_vendor_count == 0 || product_count == 0) {
usbids_vendor_count = -1;
g_strfreev(lines);
g_free(contents);
More information about the Spice-commits
mailing list