From d1a54e2c3eb4dccf2f43ea3e6638f5e1639ad586 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Mon, 9 Feb 2009 05:29:17 +0000 Subject: [PATCH] ECC cleanup: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7481 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/SetupBrowserDxe/InputHandler.c | 2 +- .../Universal/SetupBrowserDxe/Presentation.c | 2 +- MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c index 1bf7704343..48f5815e43 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c @@ -1058,7 +1058,7 @@ TheKey: HiiValue.Value.u64 = 0; for (Index = 0; Index < Question->MaxContainers; Index++) { HiiValue.Value.u8 = ValueArray[Index]; - if (HiiValue.Value.u8) { + if (HiiValue.Value.u8 != 0) { break; } diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index adc0cf8384..e9fd15e7d9 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -525,7 +525,7 @@ DisplayForm ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&StringPtr[ArrayEntry])) { + if (StrLen (&StringPtr[ArrayEntry]) != 0) { NumberOfLines++; } diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index cc9652ee17..ae8d9a62d7 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -1216,7 +1216,7 @@ UpdateOptionSkipLines ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&OptionString[Index])) { + if (StrLen (&OptionString[Index]) != 0) { if (SkipValue == 0) { Row++; // @@ -1633,7 +1633,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&MenuOption->Description[Index])) { + if (StrLen (&MenuOption->Description[Index]) != 0) { if (Temp == 0) { Row++; } @@ -1728,7 +1728,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&OptionString[Index])) { + if (StrLen (&OptionString[Index]) != 0) { if (Temp2 == 0) { Row++; // @@ -1771,7 +1771,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&StringPtr[Index])) { + if (StrLen (&StringPtr[Index]) != 0) { if (Temp2 == 0) { Row++; // @@ -1945,7 +1945,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&OptionString[Index])) { + if (StrLen (&OptionString[Index]) != 0) { MenuOption->Row++; } @@ -1973,7 +1973,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&MenuOption->Description[Index])) { + if (StrLen (&MenuOption->Description[Index]) != 0) { MenuOption->Row++; } @@ -2051,7 +2051,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&OptionString[Index])) { + if (StrLen (&OptionString[Index]) != 0) { MenuOption->Row++; } @@ -2074,7 +2074,7 @@ UiDisplayMenu ( // // If there is more string to process print on the next row and increment the Skip value // - if (StrLen (&MenuOption->Description[Index])) { + if (StrLen (&MenuOption->Description[Index]) != 0) { MenuOption->Row++; } -- 2.39.2