From 805eeffa32792698d93921f8a22f7d65e9116360 Mon Sep 17 00:00:00 2001 From: Ori Messinger Date: Thu, 7 Sep 2023 16:44:35 -0400 Subject: [PATCH] kfdtest: Fix String NULL Check MCPU const char * always returns true, so check the value instead. Before: if (!MCPU) { After: if (!*MCPU) { Signed-off-by: Ori Messinger Change-Id: I414e091ca764095937311648c534351d6abf30e6 [ROCm/ROCR-Runtime commit: 5f117f760809ae6522e1535691a5edee0d814075] --- projects/rocr-runtime/tests/kfdtest/src/Assemble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/tests/kfdtest/src/Assemble.cpp b/projects/rocr-runtime/tests/kfdtest/src/Assemble.cpp index 2077375ea2..4c8ee0786d 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/Assemble.cpp +++ b/projects/rocr-runtime/tests/kfdtest/src/Assemble.cpp @@ -249,7 +249,7 @@ int Assembler::RunAssembleBuf(const char* const AssemblySource, char* OutBuf, */ int Assembler::RunAssemble(const char* const AssemblySource) { // Ensure target ASIC has been set - if (!MCPU) { + if (!*MCPU) { outs() << "ASM Error: target asic is uninitialized\n"; return -1; }