mirror of https://github.com/acidanthera/audk.git
NetworkPkg/IScsiDxe: Remove redundant call to StrLen
The commits utilizes a local variable to store the length of a string which will be used right after. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
parent
70dc3ec5a7
commit
b68c793144
|
@ -766,8 +766,10 @@ IScsiConvertAttemptConfigDataToIfrNvDataByKeyword (
|
|||
|
||||
*(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr)) = L'/';
|
||||
}
|
||||
if (StrLen (IfrNvData->ISCSIMacAddr) != 0) {
|
||||
*(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr) - 1) = L'\0';
|
||||
|
||||
StringLen = StrLen (IfrNvData->ISCSIMacAddr);
|
||||
if (StringLen > 0) {
|
||||
*(IfrNvData->ISCSIMacAddr + StringLen - 1) = L'\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue