Skip to content

Commit 4218026

Browse files
mdkinneymergify[bot]
authored andcommitted
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 tianocore#6185 Signed-off-by: Michael D Kinney <[email protected]>
1 parent 96390bb commit 4218026

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@ mktime (
148148
struct tm *t
149149
)
150150
{
151-
EFI_TIME Time = {
152-
.Year = (UINT16)t->tm_year,
153-
.Month = (UINT8)t->tm_mon,
154-
.Day = (UINT8)t->tm_mday,
155-
.Hour = (UINT8)t->tm_hour,
156-
.Minute = (UINT8)t->tm_min,
157-
.Second = (UINT8)t->tm_sec,
158-
.TimeZone = EFI_UNSPECIFIED_TIMEZONE,
159-
};
151+
EFI_TIME Time;
152+
153+
Time.Year = (UINT16)t->tm_year;
154+
Time.Month = (UINT8)t->tm_mon;
155+
Time.Day = (UINT8)t->tm_mday;
156+
Time.Hour = (UINT8)t->tm_hour;
157+
Time.Minute = (UINT8)t->tm_min;
158+
Time.Second = (UINT8)t->tm_sec;
159+
Time.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
160160

161161
return CalculateTimeT (&Time);
162162
}

0 commit comments

Comments
 (0)