From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 9400181F90 for ; Thu, 8 Dec 2016 18:20:43 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 08 Dec 2016 18:20:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,322,1477983600"; d="scan'208";a="200672149" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga004.fm.intel.com with ESMTP; 08 Dec 2016 18:20:41 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Ruiyu Ni Date: Fri, 9 Dec 2016 10:20:33 +0800 Message-Id: <1481250033-79820-1-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [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:20:43 -0000 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[] = { 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[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; UINTN Day; BOOLEAN ValidTime; ValidTime = TRUE; @@ -723,11 +723,11 @@ Returns: } else { // // Perform a more specific check of the day of the month // - Day = MonthDays[Time->Month - 1]; + Day = mMonthDays[Time->Month - 1]; if (Time->Month == 2 && IS_LEAP_YEAR (Time->Year)) { Day += 1; // // 1 extra day this month // -- 1.9.5.msysgit.1