summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/Library')
-rw-r--r--NetworkPkg/Library/DxeNetLib/NetBuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/NetworkPkg/Library/DxeNetLib/NetBuffer.c b/NetworkPkg/Library/DxeNetLib/NetBuffer.c
index a232802c9a..329a17623d 100644
--- a/NetworkPkg/Library/DxeNetLib/NetBuffer.c
+++ b/NetworkPkg/Library/DxeNetLib/NetBuffer.c
@@ -1063,7 +1063,7 @@ NetbufAllocSpace (
} else {
NetbufGetByte (Nbuf, 0, &Index);
- if ((NET_HEADSPACE(&(Nbuf->BlockOp[Index])) < Len) && (Index > 0)) {
+ if ((Index != 0) && (NET_HEADSPACE(&(Nbuf->BlockOp[Index])) < Len)) {
Index--;
}
}