From: "Wu, Jiaxin" <jiaxin.wu@intel.com>
To: "Fu, Siyuan" <siyuan.fu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>
Subject: Re: [Patch] NetworkPkg: Remove the redundant '/' in the end of returned ISCSIMacAddr keyword.
Date: Thu, 14 Sep 2017 05:15:33 +0000 [thread overview]
Message-ID: <895558F6EA4E3B41AC93A00D163B72741632C0B0@SHSMSX152.ccr.corp.intel.com> (raw)
In-Reply-To: <20170914031740.7440-1-siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
> -----Original Message-----
> From: Fu, Siyuan
> Sent: Thursday, September 14, 2017 11:18 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
> Subject: [Patch] 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>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
> NetworkPkg/IScsiDxe/IScsiConfig.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c
> b/NetworkPkg/IScsiDxe/IScsiConfig.c
> index 498221a339..c0dd305ecf 100644
> --- a/NetworkPkg/IScsiDxe/IScsiConfig.c
> +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
> @@ -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';
> + }
> }
> }
>
> --
> 2.13.0.windows.1
prev parent reply other threads:[~2017-09-14 5:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 3:17 [Patch] NetworkPkg: Remove the redundant '/' in the end of returned ISCSIMacAddr keyword Fu Siyuan
2017-09-14 5:15 ` Wu, Jiaxin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=895558F6EA4E3B41AC93A00D163B72741632C0B0@SHSMSX152.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox