From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 5CA3481F90 for ; Thu, 8 Dec 2016 18:43:19 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 08 Dec 2016 18:43:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,322,1477983600"; d="scan'208";a="1079511787" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 08 Dec 2016 18:43:18 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 18:43:18 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.11]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.206]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 10:43:16 +0800 From: "Ni, Ruiyu" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH v2 2/8] FatPkg/EnhancedFatDxe: Use global variable replace static local variable Thread-Index: AQHSUcLa5RaI1GggiEKFxnBLBXNHXaD+6DpA Date: Fri, 9 Dec 2016 02:43:16 +0000 Deferred-Delivery: Fri, 9 Dec 2016 02:43:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58EB010A@SHSMSX104.ccr.corp.intel.com> References: <1481250033-79820-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1481250033-79820-1-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDU5YmY0MWYtMTBiNy00MDc2LTgwZjUtZDA4ZTA3MTRmODc3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJnVXRoUGZlZXdKajlWNzhGMURwcnJUaEJsSEdnbXhhVEY2dHhhbHlvTG80PSJ9 x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 2/8] FatPkg/EnhancedFatDxe: Use global variable replace static local variable 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 02:43:19 -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: Friday, December 9, 2016 10:21 AM >To: edk2-devel@lists.01.org >Cc: Ni, Ruiyu >Subject: [PATCH v2 2/8] FatPkg/EnhancedFatDxe: Use global variable replace= static local variable > >Create global variable "mMonthDays" to replace static local >variable "MonthDays" in function FatIsValidTime() in Misc.c. > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Dandan Bi >--- > FatPkg/EnhancedFatDxe/Misc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/FatPkg/EnhancedFatDxe/Misc.c b/FatPkg/EnhancedFatDxe/Misc.c >index f91759c..c7455a4 100644 >--- a/FatPkg/EnhancedFatDxe/Misc.c >+++ b/FatPkg/EnhancedFatDxe/Misc.c >@@ -21,10 +21,11 @@ Abstract: > Revision History > > --*/ > > #include "Fat.h" >+UINT8 mMonthDays[] =3D { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 = }; > > FAT_TASK * > FatCreateTask ( > FAT_IFILE *IFile, > EFI_FILE_IO_TOKEN *Token >@@ -696,11 +697,10 @@ Returns: > TRUE - The time is valid. > FALSE - The time is not valid. > > --*/ > { >- static UINT8 MonthDays[] =3D { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31,= 30, 31 }; > UINTN Day; > BOOLEAN ValidTime; > > ValidTime =3D TRUE; > >@@ -723,11 +723,11 @@ Returns: > > } else { > // > // Perform a more specific check of the day of the month > // >- Day =3D MonthDays[Time->Month - 1]; >+ Day =3D mMonthDays[Time->Month - 1]; > if (Time->Month =3D=3D 2 && IS_LEAP_YEAR (Time->Year)) { > Day +=3D 1; > // > // 1 extra day this month > // >-- >1.9.5.msysgit.1