On Mon, 17 Feb 2020 at 08:31, Gaurav Jain <gaurav.j...@nxp.com> wrote: > > ASSERT in SetTime_Conf and SetWakeupTime_Conf Consistency Test. > SCT Test expect return as Invalid Parameter. > So removed ASSERT(). > > Added Time Validity Checks in SetWakeupTime. > > Signed-off-by: Gaurav Jain <gaurav.j...@nxp.com>
If this is a followup that supersedes your previous submission, it would be helpful to label this one as v2, and mention (below the ---) what the changes are wrt v1. > --- > EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > index 08fb9b0100b6..70a0d78125b9 100644 > --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > @@ -85,10 +85,6 @@ IsDayValid ( > IN EFI_TIME *Time > ) > { > - ASSERT (Time->Day >= 1); > - ASSERT (Time->Day <= mDayOfMonth[Time->Month - 1]); > - ASSERT (Time->Month != 2 || IsLeapYear (Time) || Time->Day <= 28); > - > if (Time->Day < 1 || > Time->Day > mDayOfMonth[Time->Month - 1] || > (Time->Month == 2 && !IsLeapYear (Time) && Time->Day > 28)) { > @@ -113,6 +109,7 @@ IsTimeValid( > Time->Hour > 23 || > Time->Minute > 59 || > Time->Second > 59 || > + Time->Nanosecond > 999999999 || > !IsValidTimeZone (Time->TimeZone) || > !IsValidDaylight (Time->Daylight)) { > return FALSE; > @@ -254,6 +251,9 @@ SetWakeupTime ( > OUT EFI_TIME *Time > ) > { > + if (Time == NULL || !IsTimeValid (Time)) { > + return EFI_INVALID_PARAMETER; > + } > return LibSetWakeupTime (Enabled, Time); > } > > -- > 2.17.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54545): https://edk2.groups.io/g/devel/message/54545 Mute This Topic: https://groups.io/mt/71345440/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-