SecurityPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767

Update use of DEBUG_CODE(Expression) if Expression is a complex code
block with if/while/for/case statements that use {}.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
Michael D Kinney
2021-12-05 14:33:58 -08:00
committed by mergify[bot]
parent deba54761a
commit f9f4fb2329
4 changed files with 20 additions and 20 deletions

View File

@@ -151,7 +151,7 @@ PtpCrbTpmCommand (
UINT16 Data16;
UINT32 Data32;
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
UINTN DebugSize;
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Send - "));
@@ -170,7 +170,7 @@ PtpCrbTpmCommand (
}
}
DEBUG ((DEBUG_VERBOSE, "\n"));
);
DEBUG_CODE_END ();
TpmOutSize = 0;
//
@@ -285,13 +285,13 @@ PtpCrbTpmCommand (
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
}
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - "));
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
);
DEBUG_CODE_END ();
//
// Check the response data header (tag, parasize and returncode)
//
@@ -320,13 +320,13 @@ PtpCrbTpmCommand (
BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
}
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Receive - "));
for (Index = 0; Index < TpmOutSize; Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
);
DEBUG_CODE_END ();
GoReady_Exit:
//