[compiler-rt] [compiler-rt][Fuzzer] fix windows typo (PR #84407)

David CARLIER via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 16:14:25 PST 2024


https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/84407

None

>From 9b4f353644757870e984cad80050ade65da1ad93 Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen at gmail.com>
Date: Fri, 8 Mar 2024 00:13:54 +0000
Subject: [PATCH] [compiler-rt][Fuzzer] fix windows typo

---
 compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
index 0dbcec8b5f2215..db80eb383885e6 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -243,7 +243,7 @@ void SetThreadName(std::thread &thread, const std::string &name) {
   HMODULE kbase = GetModuleHandleA("KernelBase.dll");
   proc ThreadNameProc =
       reinterpret_cast<proc>(GetProcAddress(kbase, "SetThreadDescription"));
-  if (proc) {
+  if (ThreadNameProc) {
     std::wstring buf;
     auto sz = MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, nullptr, 0);
     if (sz > 0) {



More information about the llvm-commits mailing list