Skip to content

Commit

Permalink
CodeQL is reporting Pointless comparison of unsigned value to zero.
Browse files Browse the repository at this point in the history
Signed-off-by: jasonc4 <[email protected]>
Cc: Reviewer Aaron Pop <[email protected]>
Cc: Reviewer Shruti Gupta <[email protected]>
  • Loading branch information
v-jaschen committed Nov 13, 2024
1 parent 6bf2763 commit 9a1d2ad
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,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],
Expand Down

0 comments on commit 9a1d2ad

Please sign in to comment.