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

[UNIKRAFT PATCH 1/1] Cast value to unsigned to avoid undefined behavior



Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>
---
 plat/common/pci_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plat/common/pci_bus.c b/plat/common/pci_bus.c
index cfc404e..7a66e94 100644
--- a/plat/common/pci_bus.c
+++ b/plat/common/pci_bus.c
@@ -80,7 +80,7 @@ static struct pci_bus_handler ph;
 #define PCI_BUS_SHIFT               (16)
 #define PCI_DEVICE_SHIFT            (11)
 #define PCI_FUNCTION_SHIFT          (8)
-#define PCI_ENABLE_BIT              (1 << 31)
+#define PCI_ENABLE_BIT              (1u << 31)
 
 #define PCI_CONF_CLASS_ID          (0x08)
 #define PCI_CONF_CLASS_ID_SHFT     (16)
-- 
2.27.0




 


Rackspace

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