From 1389887b8486aeceeaf244e1bffe5be517e2a899 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Thu, 10 Jul 2025 17:20:57 +0800 Subject: [PATCH] Initialize stuff_t Signed-off-by: Nick Chan --- src/usb_iokit.c | 2 +- src/usb_libusb.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/usb_iokit.c b/src/usb_iokit.c index 59cf59a..e797995 100644 --- a/src/usb_iokit.c +++ b/src/usb_iokit.c @@ -208,7 +208,7 @@ static const int pongo_usb_product = PONGO_USB_PRODUCT; int wait_for_pongo(void) { kern_return_t ret; - stuff_t stuff; + stuff_t stuff = {0}; io_iterator_t found, lost; void* cfdict_keys[3]; diff --git a/src/usb_libusb.c b/src/usb_libusb.c index 1e8696c..a3b7626 100644 --- a/src/usb_libusb.c +++ b/src/usb_libusb.c @@ -180,8 +180,7 @@ static int LostDevice(libusb_context *ctx, libusb_device *dev, libusb_hotplug_ev int wait_for_pongo(void) { - stuff_t stuff; - stuff.handle = NULL; + stuff_t stuff = {0}; libusb_hotplug_callback_handle hp[2]; libusb_context* ctx = NULL;