From 388f8b75053298a1e6d251e5651aa5e25f02fa90 Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Wed, 8 May 2024 17:19:45 -0400 Subject: [PATCH] Fix driver threads not showing type due to an if condition --- src/main.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/main.c b/src/main.c index 2111cfa..b481412 100644 --- a/src/main.c +++ b/src/main.c @@ -70,24 +70,22 @@ WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHandle ro } char typeText[30]; - if (threads[i]->type) { - switch (threads[i]->type) { - case OS_THREAD_TYPE_DRIVER: - snprintf(typeText, 30, "Type: Driver"); - break; - case OS_THREAD_TYPE_IO: - snprintf(typeText, 30, "Type: I/O"); - break; - case OS_THREAD_TYPE_APP: - snprintf(typeText, 30, "Type: App"); - break; - default: - snprintf(typeText, 30, "Type Undefined: %d", threads[i]->type); - break; - } - if (WUPSConfigItemStub_AddToCategory(catHandle, typeText) != WUPSCONFIG_API_RESULT_SUCCESS) { - DEBUG_FUNCTION_LINE_ERR("Failed to add type of thread %d to its category", threads[i]->type); - } + switch (threads[i]->type) { + case OS_THREAD_TYPE_DRIVER: + snprintf(typeText, 30, "Type: Driver"); + break; + case OS_THREAD_TYPE_IO: + snprintf(typeText, 30, "Type: I/O"); + break; + case OS_THREAD_TYPE_APP: + snprintf(typeText, 30, "Type: App"); + break; + default: + snprintf(typeText, 30, "Type Undefined: %d", threads[i]->type); + break; + } + if (WUPSConfigItemStub_AddToCategory(catHandle, typeText) != WUPSCONFIG_API_RESULT_SUCCESS) { + DEBUG_FUNCTION_LINE_ERR("Failed to add type of thread %d to its category", threads[i]->type); }