From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 13EC081F94 for ; Thu, 8 Dec 2016 17:14:13 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 08 Dec 2016 17:14:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,322,1477983600"; d="scan'208";a="40585467" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 08 Dec 2016 17:14:12 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 17:14:12 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 17:14:11 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.11]) by shsmsx102.ccr.corp.intel.com ([169.254.2.37]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 09:14:08 +0800 From: "Ni, Ruiyu" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [patch 1/8] FatPkg\EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean Thread-Index: AQHSUUF/sHz/kU+spk6l0M6G1ozX9KD+0Esg Date: Fri, 9 Dec 2016 01:14:08 +0000 Deferred-Delivery: Fri, 9 Dec 2016 01:14:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58EAFBE5@SHSMSX104.ccr.corp.intel.com> References: <1481194467-75920-1-git-send-email-dandan.bi@intel.com> <1481194467-75920-2-git-send-email-dandan.bi@intel.com> In-Reply-To: <1481194467-75920-2-git-send-email-dandan.bi@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDc0ZWNiMzQtZmNiMy00YTk1LTgwNWYtNzMzMjI5ZGU0NDYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJ3SGw1eUVHQ0d1N3NcL3BUN2ppaldOdnY2UU1rQXhLXC9RK2k5bnRVY3FIeEU9In0= x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch 1/8] FatPkg\EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean 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: Fri, 09 Dec 2016 01:14:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Regards, Ray >-----Original Message----- >From: Bi, Dandan >Sent: Thursday, December 8, 2016 6:54 PM >To: edk2-devel@lists.01.org >Cc: Ni, Ruiyu >Subject: [patch 1/8] FatPkg\EnhancedFatDxe: Avoid Non-Boolean type uses as= Boolean > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Dandan Bi >--- > FatPkg/EnhancedFatDxe/FileName.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/FatPkg/EnhancedFatDxe/FileName.c b/FatPkg/EnhancedFatDxe/File= Name.c >index 5df4036..f393aa6 100644 >--- a/FatPkg/EnhancedFatDxe/FileName.c >+++ b/FatPkg/EnhancedFatDxe/FileName.c >@@ -57,11 +57,11 @@ Returns: > UINTN ExtendNameLen; > > PossibleShortName =3D TRUE; > SeparateDot =3D NULL; > SetMem (File8Dot3Name, FAT_NAME_LEN, ' '); >- for (TempName =3D FileName; *TempName; TempName++) { >+ for (TempName =3D FileName; *TempName !=3D '\0'; TempName++) { > if (*TempName =3D=3D L'.') { > SeparateDot =3D TempName; > } > } > >@@ -451,11 +451,11 @@ Returns: > { > UINTN ShortNameLen; > UINT8 Sum; > Sum =3D 0; > for (ShortNameLen =3D FAT_NAME_LEN; ShortNameLen !=3D 0; ShortNameLen--= ) { >- Sum =3D (UINT8)(((Sum & 1) ? 0x80 : 0) + (Sum >> 1) + *ShortNameStrin= g++); >+ Sum =3D (UINT8)((((Sum & 1) !=3D 0) ? 0x80 : 0) + (Sum >> 1) + *Short= NameString++); > } > > return Sum; > } > >-- >1.9.5.msysgit.1