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>
This commit is contained in:
parent
5163b5f8d1
commit
3c8b45c8ee
|
@ -23,6 +23,7 @@ Revision History
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
#include "Fat.h"
|
#include "Fat.h"
|
||||||
|
UINT8 mMonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||||
|
|
||||||
FAT_TASK *
|
FAT_TASK *
|
||||||
FatCreateTask (
|
FatCreateTask (
|
||||||
|
@ -698,7 +699,6 @@ Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
static UINT8 MonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
|
||||||
UINTN Day;
|
UINTN Day;
|
||||||
BOOLEAN ValidTime;
|
BOOLEAN ValidTime;
|
||||||
|
|
||||||
|
@ -725,7 +725,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// Perform a more specific check of the day of the month
|
// 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)) {
|
if (Time->Month == 2 && IS_LEAP_YEAR (Time->Year)) {
|
||||||
Day += 1;
|
Day += 1;
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue