From d13d93b08954fbf8cf56737653ce3e2d68feda07 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 9 Nov 2022 17:43:16 +0800 Subject: [PATCH] util: Replace the usage of boolean with c11 bool in u_debug_symbol.c Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Reviewed-by: David Heidelberg Part-of: --- src/util/u_debug_symbol.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/u_debug_symbol.c b/src/util/u_debug_symbol.c index c326a2eeea7..cb7482c8ab0 100644 --- a/src/util/u_debug_symbol.c +++ b/src/util/u_debug_symbol.c @@ -66,7 +66,7 @@ getDbgHelpProcAddress(LPCSTR lpProcName) static HMODULE hModule = NULL; if (!hModule) { - static boolean bail = FALSE; + static bool bail = false; if (bail) { return NULL; @@ -96,7 +96,7 @@ getDbgHelpProcAddress(LPCSTR lpProcName) } if (!hModule) { - bail = TRUE; + bail = true; return NULL; } } @@ -149,7 +149,7 @@ DBGHELP_DISPATCH(SymCleanup, BOOL, FALSE, (HANDLE hProcess), (hProcess)) #undef DBGHELP_DISPATCH -static inline boolean +static inline bool debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) { DWORD64 dwAddr = (DWORD64)(uintptr_t)addr; @@ -196,17 +196,17 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCTSTR)addr, &hModule)) { - return FALSE; + return false; } if (GetModuleFileNameA(hModule, buffer, sizeof buffer) == sizeof buffer) { - return FALSE; + return false; } snprintf(buf, size, "%p at %s+0x%lx", addr, buffer, (unsigned long)((uintptr_t)addr - (uintptr_t)hModule)); - return TRUE; + return true; } /* @@ -224,7 +224,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) snprintf(buf, size, "%s", pSymbol->Name); } - return TRUE; + return true; } #endif /* PIPE_OS_WINDOWS */