summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2021-12-05 14:33:54 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commited7f7c916840f1e2afff0c5a6fb1161737ad1941 (patch)
tree7ccb98cdd1ac43c922bd6500fe93cfd6e5e9701d /NetworkPkg
parent098307e0826000332aec57211da2f32359ed5b24 (diff)
downloadedk2-ed7f7c916840f1e2afff0c5a6fb1161737ad1941.tar.gz
edk2-ed7f7c916840f1e2afff0c5a6fb1161737ad1941.tar.bz2
edk2-ed7f7c916840f1e2afff0c5a6fb1161737ad1941.zip
NetworkPkg: 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: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/ArpDxe/ArpImpl.c8
-rw-r--r--NetworkPkg/MnpDxe/MnpConfig.c4
-rw-r--r--NetworkPkg/MnpDxe/MnpIo.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/NetworkPkg/ArpDxe/ArpImpl.c b/NetworkPkg/ArpDxe/ArpImpl.c
index fe92a9855c..ad5cb3cf7b 100644
--- a/NetworkPkg/ArpDxe/ArpImpl.c
+++ b/NetworkPkg/ArpDxe/ArpImpl.c
@@ -304,12 +304,12 @@ RESTART_RECEIVE:
//
Status = ArpService->Mnp->Receive (ArpService->Mnp, RxToken);
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "ArpOnFrameRcvd: ArpService->Mnp->Receive "
"failed, %r\n.", Status));
}
- );
+ DEBUG_CODE_END ();
}
/**
@@ -358,11 +358,11 @@ ArpOnFrameSentDpc (
TxToken = (EFI_MANAGED_NETWORK_COMPLETION_TOKEN *)Context;
TxData = TxToken->Packet.TxData;
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
if (EFI_ERROR (TxToken->Status)) {
DEBUG ((DEBUG_ERROR, "ArpOnFrameSent: TxToken->Status, %r.\n", TxToken->Status));
}
- );
+ DEBUG_CODE_END ();
//
// Free the allocated memory and close the event.
diff --git a/NetworkPkg/MnpDxe/MnpConfig.c b/NetworkPkg/MnpDxe/MnpConfig.c
index b27bc2e1f6..1e9b390586 100644
--- a/NetworkPkg/MnpDxe/MnpConfig.c
+++ b/NetworkPkg/MnpDxe/MnpConfig.c
@@ -1669,7 +1669,7 @@ MnpConfigReceiveFilters (
MCastFilterCnt,
MCastFilter
);
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
if (EFI_ERROR (Status)) {
DEBUG (
(DEBUG_ERROR,
@@ -1677,7 +1677,7 @@ MnpConfigReceiveFilters (
Status)
);
}
- );
+ DEBUG_CODE_END ();
if (MCastFilter != NULL) {
//
diff --git a/NetworkPkg/MnpDxe/MnpIo.c b/NetworkPkg/MnpDxe/MnpIo.c
index 1f8d2e2504..d5707ae26a 100644
--- a/NetworkPkg/MnpDxe/MnpIo.c
+++ b/NetworkPkg/MnpDxe/MnpIo.c
@@ -898,11 +898,11 @@ MnpReceivePacket (
//
Status = Snp->Receive (Snp, &HeaderSize, &BufLen, BufPtr, NULL, NULL, NULL);
if (EFI_ERROR (Status)) {
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
if (Status != EFI_NOT_READY) {
DEBUG ((DEBUG_WARN, "MnpReceivePacket: Snp->Receive() = %r.\n", Status));
}
- );
+ DEBUG_CODE_END ();
return Status;
}