From 46643a8ec7f0cbc17c327055afeaa45d676c5267 Mon Sep 17 00:00:00 2001 From: Shweta Khatri Date: Tue, 18 Jul 2023 19:46:14 -0400 Subject: [PATCH] Correct evaluating condition to use logical AND Aqlpacket:IsValid() function: Replaced bitwise AND operator (&) with the logical AND operator (&&) when evaluating AQL packet type Change-Id: I59980bc206cc7eff424023fff0bb92b618aa8c70 [ROCm/ROCR-Runtime commit: a2d0adf9be8b0d1f17fcc09afbc0b933a9b8df9a] --- projects/rocr-runtime/runtime/hsa-runtime/core/inc/queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/queue.h b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/queue.h index fd43b16fad..3320ea7e74 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/queue.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/queue.h @@ -72,7 +72,7 @@ struct AqlPacket { } bool IsValid() const { - return int(type() <= HSA_PACKET_TYPE_BARRIER_OR) & (type() != HSA_PACKET_TYPE_INVALID); + return ((type() <= HSA_PACKET_TYPE_BARRIER_OR) && (type() != HSA_PACKET_TYPE_INVALID)); } std::string string() const {