summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index 5bad2f13a6..55c72027fc 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -2949,10 +2949,10 @@ NetLibAsciiStrToIp6 (
LeadZeroCnt++;
}
} else {
- if ((Cnt == 4) && (*TempStr == '0') && (LeadZero == FALSE)) {
+ if ((Cnt == 4) && (*TempStr == '0') && !LeadZero) {
return EFI_INVALID_PARAMETER;
}
- if ((Cnt != 0) && (Cnt < 4) && (LeadZero == TRUE)) {
+ if ((Cnt != 0) && (Cnt < 4) && LeadZero) {
return EFI_INVALID_PARAMETER;
}
}