From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9FD1882066 for ; Wed, 15 Feb 2017 00:46:24 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2017 00:46:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,165,1484035200"; d="scan'208";a="225514350" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 15 Feb 2017 00:46:22 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 15 Feb 2017 00:46:22 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 15 Feb 2017 00:46:22 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Wed, 15 Feb 2017 16:46:20 +0800 From: "Zhu, Yonghong" To: Paolo Bonzini , "edk2-devel@ml01.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] VfrCompile: fix invalid comparison between pointer and integer Thread-Index: AQHShfhHs2KVxYenWkmU9nFgQ9pRCaFm9Iog//+BYoCAAy71AA== Date: Wed, 15 Feb 2017 08:46:19 +0000 Message-ID: References: <20170213125400.27421-1-pbonzini@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] VfrCompile: fix invalid comparison between pointer and integer X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 08:46:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Paolo, "-s ''" is an error, current the error message is not same as no option, be= cause the content after the " all be treated as -s 's input. May I know what's your comment on Nikolai SAOUKH's patch ? - if (mStringFileName =3D=3D '\0' ) { + if (mStringFileName =3D=3D NULL || *mStringFileName =3D=3D '\0' ) { Best Regards, Zhu Yonghong -----Original Message----- From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bon= zini Sent: Monday, February 13, 2017 10:18 PM To: Zhu, Yonghong ; edk2-devel@ml01.01.org Cc: Gao, Liming Subject: Re: [edk2] [PATCH] VfrCompile: fix invalid comparison between poin= ter and integer On 13/02/2017 14:55, Zhu, Yonghong wrote: > Hi Paolo Bonzini, >=20 > We already had another patch for this issue. Please help to check the at= tachment. Thanks. Is it intended that "-s ''" is not an error, rather it is the same as no op= tion at all? Paolo > Best Regards, > Zhu Yonghong >=20 >=20 > -----Original Message----- > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Sent: Monday, February 13, 2017 8:54 PM > To: edk2-devel@ml01.01.org > Cc: Zhu, Yonghong ; Gao, Liming=20 > > Subject: [PATCH] VfrCompile: fix invalid comparison between pointer=20 > and integer >=20 > This would be valid C but is not valid C++, so change the comparison to d= o what it has always been doing. >=20 > Signed-off-by: Paolo Bonzini > --- > BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp=20 > b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp > index 3ca57ed..2f97975 100644 > --- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp > +++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp > @@ -3372,7 +3372,7 @@ CVfrStringDB::GetVarStoreNameFormStringId ( > UINT8 BlockType; > EFI_HII_STRING_PACKAGE_HDR *PkgHeader; > =20 > - if (mStringFileName =3D=3D '\0' ) { > + if (mStringFileName =3D=3D NULL) { > return NULL; > } > =20 > -- > 2.9.3 >=20 >=20 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >=20