Skip to content

Commit 909b1a9

Browse files
cosmo0920edsiper
authored andcommitted
in_winevtlog: Remove needless locale related lines
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 282081f commit 909b1a9

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

plugins/in_winevtlog/pack.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,28 +276,20 @@ static int pack_filetime(struct winevtlog_config *ctx, ULONGLONG filetime)
276276
int offset_hours;
277277
int offset_minutes;
278278
char offset_sign;
279-
_locale_t locale;
280279
DWORD tz_id;
281280

282281
_tzset();
283282

284-
locale = _get_current_locale();
285-
if (locale == NULL) {
286-
return -1;
287-
}
288-
289283
ft.dwHighDateTime = (DWORD)(filetime >> 32);
290284
ft.dwLowDateTime = (DWORD)(filetime & 0xFFFFFFFF);
291285

292286
if (!FileTimeToSystemTime(&ft, &st_utc)) {
293-
_free_locale(locale);
294287
return -1;
295288
}
296289

297290
tz_id = GetDynamicTimeZoneInformation(&dtzi);
298291

299292
if (!SystemTimeToTzSpecificLocalTimeEx(&dtzi, &st_utc, &st_local)) {
300-
_free_locale(locale);
301293
return -1;
302294
}
303295

@@ -337,12 +329,9 @@ static int pack_filetime(struct winevtlog_config *ctx, ULONGLONG filetime)
337329
offset_minutes);
338330

339331
if (len <= 0) {
340-
_free_locale(locale);
341332
return -1;
342333
}
343334

344-
_free_locale(locale);
345-
346335
flb_log_event_encoder_append_body_string(ctx->log_encoder, buf, len);
347336
return 0;
348337
}

0 commit comments

Comments
 (0)