git: be522176951d - main - libusb: make libusb_hotplug_get_user_data actually return user_data
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Feb 2026 08:14:08 UTC
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/src/commit/?id=be522176951d8b542de9354f4ec9ac7603745b71
commit be522176951d8b542de9354f4ec9ac7603745b71
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2026-02-15 19:39:18 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2026-02-16 08:14:05 +0000
libusb: make libusb_hotplug_get_user_data actually return user_data
MFC After: 2 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55291
---
lib/libusb/libusb10_hotplug.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/libusb/libusb10_hotplug.c b/lib/libusb/libusb10_hotplug.c
index 9c46d4926bfa..359c818b5720 100644
--- a/lib/libusb/libusb10_hotplug.c
+++ b/lib/libusb/libusb10_hotplug.c
@@ -430,5 +430,7 @@ libusb_hotplug_get_user_data(struct libusb_context *ctx,
}
HOTPLUG_UNLOCK(ctx);
- return (handle);
+ if (handle != NULL)
+ return (handle->user_data);
+ return (NULL);
}