NetworkPkg: Remove the redundant '/' in the end of returned ISCSIMacAddr keyword.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
Fu Siyuan 2017-09-14 11:13:05 +08:00
parent 4084ccfa22
commit fbfe64203b
1 changed files with 10 additions and 6 deletions

View File

@ -749,14 +749,15 @@ IScsiConvertAttemptConfigDataToIfrNvDataByKeyword (
}
CopyMem(IfrNvData->ISCSIDisplayAttemptList, AttemptNameList, ATTEMPT_NAME_LIST_SIZE);
ZeroMem (IfrNvData->ISCSIMacAddr, sizeof (IfrNvData->ISCSIMacAddr));
NET_LIST_FOR_EACH (Entry, &mPrivate->NicInfoList) {
NicInfo = NET_LIST_USER_STRUCT (Entry, ISCSI_NIC_INFO, Link);
IScsiMacAddrToStr (
&NicInfo->PermanentAddress,
NicInfo->HwAddressSize,
NicInfo->VlanId,
MacString
);
&NicInfo->PermanentAddress,
NicInfo->HwAddressSize,
NicInfo->VlanId,
MacString
);
CopyMem (
IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr),
MacString,
@ -764,7 +765,10 @@ IScsiConvertAttemptConfigDataToIfrNvDataByKeyword (
);
*(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr)) = L'/';
}
}
if (StrLen (IfrNvData->ISCSIMacAddr) != 0) {
*(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr) - 1) = L'\0';
}
}
}