From 4218026bd6ebf10bb1e71e0dd93ebbb56ca8c2f7 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Fri, 3 Jan 2025 22:28:21 -0800 Subject: [PATCH] CryptoPkg/BaseCryptLib: Fix mktime() coding style issue Move local variable init to C statements to follow coding standard and remove the use of field names in structure initialization to maximize compiler compatibility. This issue was introduced by PR #6185 Signed-off-by: Michael D Kinney --- .../BaseCryptLib/SysCall/TimerWrapper.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c index 9b3a2911d0..894aeb016f 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c @@ -148,15 +148,15 @@ mktime ( struct tm *t ) { - EFI_TIME Time = { - .Year = (UINT16)t->tm_year, - .Month = (UINT8)t->tm_mon, - .Day = (UINT8)t->tm_mday, - .Hour = (UINT8)t->tm_hour, - .Minute = (UINT8)t->tm_min, - .Second = (UINT8)t->tm_sec, - .TimeZone = EFI_UNSPECIFIED_TIMEZONE, - }; + EFI_TIME Time; + + Time.Year = (UINT16)t->tm_year; + Time.Month = (UINT8)t->tm_mon; + Time.Day = (UINT8)t->tm_mday; + Time.Hour = (UINT8)t->tm_hour; + Time.Minute = (UINT8)t->tm_min; + Time.Second = (UINT8)t->tm_sec; + Time.TimeZone = EFI_UNSPECIFIED_TIMEZONE; return CalculateTimeT (&Time); }