[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] xencrsh: Fix inverted BUG_ON


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Date: Thu, 22 Oct 2026 09:32:25 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Cc: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Delivery-date: Thu, 22 Oct 2026 07:32:40 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

BUG_ON(_EXP) called BUG when _EXP was false, the opposite of every
other copy of assert.h. There is no caller yet, so nothing is affected,
but the first BUG_ON() added would have fired on the valid case.
Fixed by syncing with xenbus.

Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xencrsh/assert.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xencrsh/assert.h b/src/xencrsh/assert.h
index 3692e94..7fc3014 100644
--- a/src/xencrsh/assert.h
+++ b/src/xencrsh/assert.h
@@ -71,7 +71,7 @@ __Bug(
         } while (FALSE)
 
 #define BUG_ON(_EXP)                \
-        if (!(_EXP)) BUG(#_EXP)
+        if (_EXP) BUG(#_EXP)
 
 #undef  ASSERT
 
-- 
2.55.0.windows.5



--
Césaire Mounah | Vates Windows Guest Tools Engineer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.