From 3c8b45c8ee23af2ff35e2492c24c77ff10743ab6 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Fri, 9 Dec 2016 09:55:15 +0800 Subject: FatPkg/EnhancedFatDxe: Use global variable replace static local variable Create global variable "mMonthDays" to replace static local variable "MonthDays" in FatIsValidTime() function in Misc.c. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Ruiyu Ni --- FatPkg/EnhancedFatDxe/Misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FatPkg') diff --git a/FatPkg/EnhancedFatDxe/Misc.c b/FatPkg/EnhancedFatDxe/Misc.c index f91759c775..c7455a4412 100644 --- a/FatPkg/EnhancedFatDxe/Misc.c +++ b/FatPkg/EnhancedFatDxe/Misc.c @@ -23,6 +23,7 @@ Revision History --*/ #include "Fat.h" +UINT8 mMonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; FAT_TASK * FatCreateTask ( @@ -698,7 +699,6 @@ Returns: --*/ { - static UINT8 MonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; UINTN Day; BOOLEAN ValidTime; @@ -725,7 +725,7 @@ Returns: // // 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; // -- cgit v1.2.3