summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DxeNetLib
diff options
context:
space:
mode:
authorqianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-01 09:53:52 +0000
committerqianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-01 09:53:52 +0000
commit04bb6788ddc58a354e487ea27e5a4194102fc4b5 (patch)
treee39990a93219b21947831c01309a63c8d2de675c /MdeModulePkg/Library/DxeNetLib
parent337661bb8c981400d3a0c93d0d49a65f2e4eed8c (diff)
downloadedk2-platforms-04bb6788ddc58a354e487ea27e5a4194102fc4b5.tar.xz
MdeModulePkg\Library\DxeNetLib: Update the NetLibStrToIp6andPrefix() to return different values for two situations - a. The Input string doesn’t contain the prefix length; b. The prefix length contains prefix length and the prefix length is zero.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9898 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/DxeNetLib')
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index d89ac6483d..a5a6762985 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -2760,13 +2760,17 @@ NetLibStrToIp6andPrefix (
}
//
+ // If input string doesn't indicate the prefix length, return 0xff.
+ //
+ Length = 0xFF;
+
+ //
// Convert the string to prefix length
//
- Length = 0;
if (PrefixStr != NULL) {
Status = EFI_INVALID_PARAMETER;
-
+ Length = 0;
while (*PrefixStr != '\0') {
if (NET_IS_DIGIT (*PrefixStr)) {
Length = (UINT8) (Length * 10 + (*PrefixStr - '0'));