NetworkPkg/IScsiDxe: rebase to ARRAY_SIZE()

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek 2016-10-26 19:17:00 +02:00
parent 33f615e2c3
commit f256ab43ea
3 changed files with 6 additions and 6 deletions

View File

@ -1111,7 +1111,7 @@ IScsiConfigUpdateAttempt (
NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) { NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) {
AttemptConfigData = NET_LIST_USER_STRUCT (Entry, ISCSI_ATTEMPT_CONFIG_NVDATA, Link); AttemptConfigData = NET_LIST_USER_STRUCT (Entry, ISCSI_ATTEMPT_CONFIG_NVDATA, Link);
AsciiStrToUnicodeStrS (AttemptConfigData->AttemptName, AttemptName, sizeof (AttemptName) / sizeof (AttemptName[0])); AsciiStrToUnicodeStrS (AttemptConfigData->AttemptName, AttemptName, ARRAY_SIZE (AttemptName));
UnicodeSPrint (mPrivate->PortString, (UINTN) 128, L"Attempt %s", AttemptName); UnicodeSPrint (mPrivate->PortString, (UINTN) 128, L"Attempt %s", AttemptName);
AttemptConfigData->AttemptTitleToken = HiiSetString ( AttemptConfigData->AttemptTitleToken = HiiSetString (
mCallbackInfo->RegisteredHandle, mCallbackInfo->RegisteredHandle,
@ -1240,7 +1240,7 @@ IScsiConfigDeleteAttempts (
mPrivate->SinglePathCount--; mPrivate->SinglePathCount--;
} }
AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, ARRAY_SIZE (MacString));
UnicodeSPrint ( UnicodeSPrint (
mPrivate->PortString, mPrivate->PortString,

View File

@ -673,7 +673,7 @@ IScsiStart (
Session->ConfigData = AttemptConfigData; Session->ConfigData = AttemptConfigData;
Session->AuthType = AttemptConfigData->AuthenticationType; Session->AuthType = AttemptConfigData->AuthenticationType;
AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, ARRAY_SIZE (MacString));
UnicodeSPrint ( UnicodeSPrint (
mPrivate->PortString, mPrivate->PortString,
(UINTN) ISCSI_NAME_IFR_MAX_SIZE, (UINTN) ISCSI_NAME_IFR_MAX_SIZE,

View File

@ -1109,7 +1109,7 @@ IScsiGetConfigData (
// //
// Refresh the state of this attempt to NVR. // Refresh the state of this attempt to NVR.
// //
AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, ARRAY_SIZE (MacString));
UnicodeSPrint ( UnicodeSPrint (
mPrivate->PortString, mPrivate->PortString,
(UINTN) ISCSI_NAME_IFR_MAX_SIZE, (UINTN) ISCSI_NAME_IFR_MAX_SIZE,
@ -1148,7 +1148,7 @@ IScsiGetConfigData (
// //
// Refresh the state of this attempt to NVR. // Refresh the state of this attempt to NVR.
// //
AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, ARRAY_SIZE (MacString));
UnicodeSPrint ( UnicodeSPrint (
mPrivate->PortString, mPrivate->PortString,
(UINTN) ISCSI_NAME_IFR_MAX_SIZE, (UINTN) ISCSI_NAME_IFR_MAX_SIZE,
@ -1239,7 +1239,7 @@ IScsiGetConfigData (
// //
// Refresh the state of this attempt to NVR. // Refresh the state of this attempt to NVR.
// //
AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, ARRAY_SIZE (MacString));
UnicodeSPrint ( UnicodeSPrint (
mPrivate->PortString, mPrivate->PortString,
(UINTN) ISCSI_NAME_IFR_MAX_SIZE, (UINTN) ISCSI_NAME_IFR_MAX_SIZE,