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 <michael.d.kinney@intel.com>
This commit is contained in:
Michael D Kinney 2025-01-03 22:28:21 -08:00 committed by mergify[bot]
parent 96390bb8a5
commit 4218026bd6

View File

@ -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);
}