Skip to content

Commit

Permalink
Fixing codeQl issue Pointless comparison of unsigned value to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
apop5 committed Aug 7, 2024
1 parent 99bf545 commit a44a8b7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit a44a8b7

Please sign in to comment.