Message ID | 20161026190504.9888-34-lersek@redhat.com |
---|---|
State | Accepted |
Commit | f256ab43eaaa0e28204b55256699fe07120e2244 |
Headers | show |
Reviewed-by: Fu Siyuan siyuan.fu@intel.com > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Thursday, October 27, 2016 3:05 AM > To: edk2-devel-01 <edk2-devel@ml01.01.org> > Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com> > Subject: [PATCH 33/47] 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> > --- > NetworkPkg/IScsiDxe/IScsiConfig.c | 4 ++-- > NetworkPkg/IScsiDxe/IScsiDriver.c | 2 +- > NetworkPkg/IScsiDxe/IScsiMisc.c | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c > b/NetworkPkg/IScsiDxe/IScsiConfig.c > index 3631e72e3455..16a90a6206aa 100644 > --- a/NetworkPkg/IScsiDxe/IScsiConfig.c > +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c > @@ -1111,7 +1111,7 @@ IScsiConfigUpdateAttempt ( > NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) { > 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); > AttemptConfigData->AttemptTitleToken = HiiSetString ( > mCallbackInfo- > >RegisteredHandle, > @@ -1240,7 +1240,7 @@ IScsiConfigDeleteAttempts ( > mPrivate->SinglePathCount--; > } > > - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > sizeof (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > ARRAY_SIZE (MacString)); > > UnicodeSPrint ( > mPrivate->PortString, > diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c > b/NetworkPkg/IScsiDxe/IScsiDriver.c > index 279f1c049679..ac10fa26d1b9 100644 > --- a/NetworkPkg/IScsiDxe/IScsiDriver.c > +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c > @@ -673,7 +673,7 @@ IScsiStart ( > Session->ConfigData = AttemptConfigData; > Session->AuthType = AttemptConfigData->AuthenticationType; > > - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > sizeof (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > ARRAY_SIZE (MacString)); > UnicodeSPrint ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c > b/NetworkPkg/IScsiDxe/IScsiMisc.c > index 64bb2ade7b0a..11a80f2e10e4 100644 > --- a/NetworkPkg/IScsiDxe/IScsiMisc.c > +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c > @@ -1109,7 +1109,7 @@ IScsiGetConfigData ( > // > // 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 ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > @@ -1148,7 +1148,7 @@ IScsiGetConfigData ( > // > // 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 ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > @@ -1239,7 +1239,7 @@ IScsiGetConfigData ( > // > // 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 ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > -- > 2.9.2 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c index 3631e72e3455..16a90a6206aa 100644 --- a/NetworkPkg/IScsiDxe/IScsiConfig.c +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c @@ -1111,7 +1111,7 @@ IScsiConfigUpdateAttempt ( NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) { 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); AttemptConfigData->AttemptTitleToken = HiiSetString ( mCallbackInfo->RegisteredHandle, @@ -1240,7 +1240,7 @@ IScsiConfigDeleteAttempts ( mPrivate->SinglePathCount--; } - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, ARRAY_SIZE (MacString)); UnicodeSPrint ( mPrivate->PortString, diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c index 279f1c049679..ac10fa26d1b9 100644 --- a/NetworkPkg/IScsiDxe/IScsiDriver.c +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c @@ -673,7 +673,7 @@ IScsiStart ( Session->ConfigData = AttemptConfigData; Session->AuthType = AttemptConfigData->AuthenticationType; - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, sizeof (MacString) / sizeof (MacString[0])); + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, ARRAY_SIZE (MacString)); UnicodeSPrint ( mPrivate->PortString, (UINTN) ISCSI_NAME_IFR_MAX_SIZE, diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index 64bb2ade7b0a..11a80f2e10e4 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -1109,7 +1109,7 @@ IScsiGetConfigData ( // // 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 ( mPrivate->PortString, (UINTN) ISCSI_NAME_IFR_MAX_SIZE, @@ -1148,7 +1148,7 @@ IScsiGetConfigData ( // // 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 ( mPrivate->PortString, (UINTN) ISCSI_NAME_IFR_MAX_SIZE, @@ -1239,7 +1239,7 @@ IScsiGetConfigData ( // // 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 ( mPrivate->PortString, (UINTN) ISCSI_NAME_IFR_MAX_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> --- NetworkPkg/IScsiDxe/IScsiConfig.c | 4 ++-- NetworkPkg/IScsiDxe/IScsiDriver.c | 2 +- NetworkPkg/IScsiDxe/IScsiMisc.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) -- 2.9.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel