From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 D45B4820FD for ; Thu, 16 Feb 2017 01:03:15 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 16 Feb 2017 01:03:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,168,1484035200"; d="scan'208";a="225977667" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 16 Feb 2017 01:03:15 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 16 Feb 2017 01:03:15 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Thu, 16 Feb 2017 17:03:11 +0800 From: "Zhu, Yonghong" To: Paolo Bonzini , "edk2-devel@ml01.01.org" CC: "Gao, Liming" , Nikolai SAOUKH , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] VfrCompile: fix invalid comparison between pointer and integer Thread-Index: AQHShfhHs2KVxYenWkmU9nFgQ9pRCaFm9Iog//+BYoCAAy71AP//oAMAgAIVbdA= Date: Thu, 16 Feb 2017 09:03:10 +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: Thu, 16 Feb 2017 09:03:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Paolo, Yes, I agree with you. I also add Nikolai SAOUKH in loop in case he may ha= ve different comment. Best Regards, Zhu Yonghong -----Original Message----- From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bon= zini Sent: Wednesday, February 15, 2017 5:11 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 15/02/2017 09:46, Zhu, Yonghong wrote: >=20 > "-s ''" is an error, current the error message is not same as no option, = because the content after the " all be treated as -s 's input. > May I know what's your comment on Nikolai SAOUKH's patch ? >=20 > - if (mStringFileName =3D=3D '\0' ) { > + if (mStringFileName =3D=3D NULL || *mStringFileName =3D=3D '\0' ) { If "-s ''" is an error, it should be pointless to check *mStringFileName. Paolo