summaryrefslogtreecommitdiffstats
path: root/FatPkg
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-12-09 09:55:15 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-12-09 11:02:07 +0800
commit3c8b45c8ee23af2ff35e2492c24c77ff10743ab6 (patch)
tree79e2ace39316ab260adabcb94549aee9602ee1e1 /FatPkg
parent5163b5f8d1907f4800a0600adeb53ff640952c00 (diff)
downloadedk2-3c8b45c8ee23af2ff35e2492c24c77ff10743ab6.tar.gz
edk2-3c8b45c8ee23af2ff35e2492c24c77ff10743ab6.tar.bz2
edk2-3c8b45c8ee23af2ff35e2492c24c77ff10743ab6.zip
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 <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'FatPkg')
-rw-r--r--FatPkg/EnhancedFatDxe/Misc.c4
1 files changed, 2 insertions, 2 deletions
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;
//