Module: Mesa
Branch: main
Commit: d13d93b08954fbf8cf56737653ce3e2d68feda07
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d13d93b08954fbf8cf56737653ce3e2d68feda07

Author: Yonggang Luo <[email protected]>
Date:   Wed Nov  9 17:43:16 2022 +0800

util: Replace the usage of boolean with c11 bool in u_debug_symbol.c

Signed-off-by: Yonggang Luo <[email protected]>
Reviewed-by: Jesse Natalie <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19649>

---

 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 */

Reply via email to