summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg
diff options
context:
space:
mode:
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c b/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
index c9048d7659..17466c1e6c 100644
--- a/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
+++ b/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
@@ -221,23 +221,22 @@ IsDayValid (
**/
BOOLEAN
EFIAPI
-IsTimeValid(
+IsTimeValid (
IN EFI_TIME *Time
)
{
// Check the input parameters are within the range specified by UEFI
- if ((Time->Year < 2000) ||
- (Time->Year > 2099) ||
- (Time->Month < 1 ) ||
- (Time->Month > 12 ) ||
- (!IsDayValid (Time) ) ||
- (Time->Hour > 23 ) ||
- (Time->Minute > 59 ) ||
- (Time->Second > 59 ) ||
- (Time->Nanosecond > 999999999) ||
+ if ((Time->Year < 2000) ||
+ (Time->Year > 2099) ||
+ (Time->Month < 1 ) ||
+ (Time->Month > 12 ) ||
+ (!IsDayValid (Time) ) ||
+ (Time->Hour > 23 ) ||
+ (Time->Minute > 59 ) ||
+ (Time->Second > 59 ) ||
+ (Time->Nanosecond > 999999999) ||
(!((Time->TimeZone == EFI_UNSPECIFIED_TIMEZONE) || ((Time->TimeZone >= -1440) && (Time->TimeZone <= 1440)))) ||
- (Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT)))
- ) {
+ (Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT)))) {
return FALSE;
}