Skip to content

Commit 8bd8ff7

Browse files
committed
code review fix
1 parent 5360e03 commit 8bd8ff7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mac/hid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,10 @@ static struct hid_device_info *create_device_info_with_usage(IOHIDDeviceRef dev,
720720

721721
/* A small trick to store an io_service_t tag along with hid_device_info for matching info with unplugged device */
722722
cur_dev_ex = (struct hid_device_info_ex *)calloc(1, sizeof(struct hid_device_info_ex));
723-
cur_dev = &(cur_dev_ex->info);
724-
if (cur_dev == NULL) {
723+
if (cur_dev_ex == NULL) {
725724
return NULL;
726725
}
726+
cur_dev = &(cur_dev_ex->info);
727727

728728
dev_vid = get_vendor_id(dev);
729729
dev_pid = get_product_id(dev);
@@ -1045,7 +1045,7 @@ static void hid_internal_hotplug_connect_callback(void *context, IOReturn result
10451045
}
10461046
}
10471047

1048-
int match_ref_to_info(IOHIDDeviceRef device, struct hid_device_info *info)
1048+
static int match_ref_to_info(IOHIDDeviceRef device, struct hid_device_info *info)
10491049
{
10501050
if (!device || !info) {
10511051
return 0;

0 commit comments

Comments
 (0)