public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [patch] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression
Date: Wed, 5 Apr 2017 02:47:26 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E66224A9340E0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1491015068-95352-1-git-send-email-dandan.bi@intel.com>

It's better to add StringPtr != NULL check before use *StringPtr.

-----Original Message-----
From: Bi, Dandan 
Sent: Saturday, April 1, 2017 10:51 AM
To: edk2-devel@lists.01.org
Cc: Dong, Eric; Gao, Liming
Subject: [patch] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression

Fix the incorrect comparison between pointer and constant zero character.

https://bugzilla.tianocore.org/show_bug.cgi?id=416

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
index a2abf26..166ec18 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -2200,11 +2200,11 @@ InternalHiiIfrValueAction (
     return FALSE;
   }
   
   StringPtr = ConfigAltResp;
   
-  while (StringPtr != L'\0') {
+  while (*StringPtr != L'\0') {
     //
     // 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=...
     //
     StringHdr = StringPtr;
 
-- 
1.9.5.msysgit.1



      reply	other threads:[~2017-04-05  2:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01  2:51 [patch] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression Dandan Bi
2017-04-05  2:47 ` Dong, Eric [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=ED077930C258884BBCB450DB737E66224A9340E0@shsmsx102.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