From c2565cf87f9fbb8d4279612d30906286cfafe7ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 29 Aug 2020 02:42:13 +0200 Subject: [PATCH] Cleanups --- tasks/task_autodetect_blissbox.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks/task_autodetect_blissbox.c b/tasks/task_autodetect_blissbox.c index 11a27ecb32..69607926c1 100644 --- a/tasks/task_autodetect_blissbox.c +++ b/tasks/task_autodetect_blissbox.c @@ -169,7 +169,6 @@ static const blissbox_pad_type_t* input_autoconfigure_get_blissbox_pad_type_win3 LPTSTR lp_device_path = NULL; char *device_path = NULL; DWORD index = 0; - DWORD intIndex = 0; unsigned len = 0; unsigned i = 0; char vidPidString[32] = {0}; @@ -236,12 +235,12 @@ static const blissbox_pad_type_t* input_autoconfigure_get_blissbox_pad_type_win3 deviceInterfaceData.cbSize = sizeof(SP_INTERFACE_DEVICE_DATA); /* Get information about the device interface. */ - for (intIndex = 0; (bResult = SetupDiEnumDeviceInterfaces( + for (i = 0; (bResult = SetupDiEnumDeviceInterfaces( hDeviceInfo, &device_info_data, &guidDeviceInterface, - intIndex, - &deviceInterfaceData)); intIndex++) + i, + &deviceInterfaceData)); i++) { /* Check if this is the last item */ if (GetLastError() == ERROR_NO_MORE_ITEMS)