From a44a8b7051554afd0b576d1d36c54e5b8ac067eb Mon Sep 17 00:00:00 2001 From: Aaron Pop Date: Wed, 7 Aug 2024 14:30:22 -0700 Subject: [PATCH] Fixing codeQl issue Pointless comparison of unsigned value to zero --- .../Library/SerialPortTerminalLib/SerialPortTerminalLib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c b/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c index eb127d8315..7d50e3168f 100644 --- a/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c +++ b/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c @@ -88,8 +88,7 @@ AddSerialTerminal ( (int) mSerialDevicePath.Uart.StopBits, (int) DefaultTerminalType)); - if (DefaultTerminalType >= 0 && - DefaultTerminalType < (sizeof (mTerminalType) / sizeof (mTerminalType[0]))) { + if (DefaultTerminalType < (sizeof (mTerminalType) / sizeof (mTerminalType[0]))) { CopyMem ( (VOID *) &(mSerialDevicePath.TerminalType.Guid), (VOID *) mTerminalType[DefaultTerminalType],