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,6 +749,7 @@ 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 (
@ -765,6 +766,9 @@ IScsiConvertAttemptConfigDataToIfrNvDataByKeyword (
*(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr)) = L'/';
}
if (StrLen (IfrNvData->ISCSIMacAddr) != 0) {
*(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr) - 1) = L'\0';
}
}
}