[edk2-devel] [PATCH v2 2/4] EmbeddedPkg/TimeBaseLib: Fix for minor code formatting

Nhi Pham via groups.io nhi=os.amperecomputing.com at groups.io
Wed Jan 6 16:09:01 UTC 2021


There is no functional modification in this change.

Cc: Leif Lindholm <leif at nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
Signed-off-by: Nhi Pham <nhi at os.amperecomputing.com>
---
 EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c | 23 ++++++++++----------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c b/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
index c9048d765960..17466c1e6c67 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;
   }
 
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69843): https://edk2.groups.io/g/devel/message/69843
Mute This Topic: https://groups.io/mt/79477830/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list