apps: simplify logical constraints

EFI_ERROR(EFI_NOT_STARTED) is true. So we can simplify

    (EFI_ERROR(rc) && rc == EFI_NOT_STARTED)

to

    (rc == EFI_NOT_STARTED)

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt 2021-06-23 22:23:14 +02:00
parent 2a7829c50b
commit 01a8d3bb00
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
UINTN SizeOfInfo;
rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
&info);
if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
if (rc == EFI_NOT_STARTED) {
Print(L"gop->QueryMode() returned %r\n", rc);
Print(L"Trying to start GOP with SetMode().\n");
rc = uefi_call_wrapper(gop->SetMode, 2, gop,

View File

@ -70,7 +70,7 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
UINTN SizeOfInfo;
rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
&info);
if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
if (rc == EFI_NOT_STARTED) {
Print(L"gop->QueryMode() returned %r\n", rc);
Print(L"Trying to start GOP with SetMode().\n");
rc = uefi_call_wrapper(gop->SetMode, 2, gop,

View File

@ -22,7 +22,7 @@ print_modes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
UINTN SizeOfInfo;
rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
&info);
if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
if (rc == EFI_NOT_STARTED) {
Print(L"gop->QueryMode() returned %r\n", rc);
Print(L"Trying to start GOP with SetMode().\n");
rc = uefi_call_wrapper(gop->SetMode, 2, gop,