summaryrefslogtreecommitdiff
path: root/DuetPkg/PcRtc/RealTimeClock.c
diff options
context:
space:
mode:
Diffstat (limited to 'DuetPkg/PcRtc/RealTimeClock.c')
-rw-r--r--DuetPkg/PcRtc/RealTimeClock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/DuetPkg/PcRtc/RealTimeClock.c b/DuetPkg/PcRtc/RealTimeClock.c
index d3c5f31c4d..6666d48a37 100644
--- a/DuetPkg/PcRtc/RealTimeClock.c
+++ b/DuetPkg/PcRtc/RealTimeClock.c
@@ -41,6 +41,8 @@ CompareHMS (
IN EFI_TIME *From,
IN EFI_TIME *To
);
+
+INTN mDayOfMonth[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
UINT8
RtcRead (
@@ -873,10 +875,9 @@ Returns:
--*/
{
- INTN DayOfMonth[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
if (Time->Day < 1 ||
- Time->Day > DayOfMonth[Time->Month - 1] ||
+ Time->Day > mDayOfMonth[Time->Month - 1] ||
(Time->Month == 2 && (!IsLeapYear (Time) && Time->Day > 28))
) {
return FALSE;
@@ -1002,7 +1003,6 @@ Returns:
--*/
{
- UINT8 DayOfMonth[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
BOOLEAN Adjacent = FALSE;
if (From->Year == To->Year) {
@@ -1023,7 +1023,7 @@ Returns:
Adjacent = TRUE;
}
}
- } else if (From->Day == DayOfMonth[From->Month - 1]) {
+ } else if (From->Day == mDayOfMonth[From->Month - 1]) {
if ((CompareHMS(From, To) >= 0)) {
Adjacent = TRUE;
}