Skip to content

Commit 40131e4

Browse files
apop5ardbiesheuvel
authored andcommitted
MdeModulePkg: Fix regressions from 11686, 11687, 11688, 11689.
11686, 11687, 11688, 11689 included some inverted conditionals during the refactor. While the system booted, some behavior was incorrect based on the inverted conditionals. Signed-off-by: Aaron Pop <[email protected]>
1 parent a058a28 commit 40131e4

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@ UiDisplayMenu (
32693269
// If the screen has no menu items, and the user didn't select UiReset
32703270
// ignore the selection and go back to reading keys.
32713271
//
3272-
if (MenuOption != NULL ) {
3272+
if (MenuOption == NULL ) {
32733273
ASSERT (MenuOption != NULL);
32743274
break;
32753275
}
@@ -3324,7 +3324,7 @@ UiDisplayMenu (
33243324
break;
33253325
}
33263326

3327-
if (MenuOption != NULL) {
3327+
if (MenuOption == NULL) {
33283328
ASSERT (MenuOption != NULL);
33293329
break;
33303330
}
@@ -3413,7 +3413,7 @@ UiDisplayMenu (
34133413

34143414
case CfUiSelect:
34153415
ControlFlag = CfRepaint;
3416-
if (MenuOption != NULL ) {
3416+
if (MenuOption == NULL ) {
34173417
ASSERT (MenuOption != NULL);
34183418
break;
34193419
}
@@ -3472,7 +3472,7 @@ UiDisplayMenu (
34723472

34733473
case CfUiHotKey:
34743474
ControlFlag = CfRepaint;
3475-
if (HotKey != NULL ) {
3475+
if (HotKey == NULL ) {
34763476
ASSERT (HotKey != NULL);
34773477
break;
34783478
}

MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ GetSelectionInputPopUp (
17171717
gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;
17181718
}
17191719
} else {
1720-
if (CurrentOption != NULL) {
1720+
if (CurrentOption == NULL) {
17211721
ASSERT (CurrentOption != NULL);
17221722
break;
17231723
}

MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ EdbLoadCodBySymbolByIec (
12681268
// get function name, function name is followed by char 0x09.
12691269
//
12701270
FieldBuffer = AsciiStrGetNewTokenField (LineBuffer, Char);
1271-
if (FieldBuffer != NULL) {
1271+
if (FieldBuffer == NULL) {
12721272
break;
12731273
}
12741274

MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ UpdateFvFileDevicePath (
361361
// Build the shell device path
362362
//
363363
NewDevicePath = DevicePathFromHandle (FoundFvHandle);
364-
if (NewDevicePath != NULL) {
364+
if (NewDevicePath == NULL) {
365365
return EFI_NOT_FOUND;
366366
}
367367

MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,7 @@ ParseOpCodes (
24542454
//
24552455
// Insert to Option list of current Question
24562456
//
2457-
if (ParentStatement != NULL) {
2457+
if (ParentStatement == NULL) {
24582458
break;
24592459
}
24602460

MdeModulePkg/Universal/SetupBrowserDxe/Setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ LoadAllHiiFormset (
363363
// Initilize FormSet Setting
364364
//
365365
LocalFormSet = AllocateZeroPool (sizeof (FORM_BROWSER_FORMSET));
366-
if (LocalFormSet != NULL ) {
366+
if (LocalFormSet == NULL ) {
367367
ASSERT (LocalFormSet != NULL);
368368
return;
369369
}
@@ -3291,7 +3291,7 @@ ConfirmNoSubmitFail (
32913291
}
32923292

32933293
StringBuffer = AllocateZeroPool (256 * sizeof (CHAR16));
3294-
if (StringBuffer != NULL) {
3294+
if (StringBuffer == NULL) {
32953295
ASSERT (StringBuffer != NULL);
32963296
return RetVal;
32973297
}
@@ -4423,7 +4423,7 @@ GetQuestionDefault (
44234423
if (!EFI_ERROR (Status)) {
44244424
if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
44254425
NewString = GetToken (Question->HiiValue.Value.string, FormSet->HiiHandle);
4426-
if (NewString != NULL) {
4426+
if (NewString == NULL) {
44274427
ASSERT (NewString != NULL);
44284428
return EFI_NOT_FOUND;
44294429
}

0 commit comments

Comments
 (0)