Skip to content

Commit ac26714

Browse files
committed
in_winevtlog: Suppress warnings
1 parent 1729b46 commit ac26714

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugins/in_winevtlog/in_winevtlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static int in_winevtlog_init(struct flb_input_instance *in,
177177
flb_plg_error(in, "could not initialize event encoder");
178178
flb_free(ctx);
179179

180-
return NULL;
180+
return -1;
181181
}
182182

183183
/* Load the config map */

plugins/in_winevtlog/pack.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
static int pack_nullstr(struct winevtlog_config *ctx)
3636
{
37-
flb_log_event_encoder_append_body_cstring(ctx->log_encoder, "");
37+
return flb_log_event_encoder_append_body_cstring(ctx->log_encoder, "");
3838
}
3939

4040
static int pack_wstr(struct winevtlog_config *ctx, const wchar_t *wstr)
@@ -314,6 +314,8 @@ static int pack_sid(struct winevtlog_config *ctx, PSID sid, int extract_sid)
314314

315315
_snprintf_s(formatted, result_len, _TRUNCATE, "%s\\%s", domain, account);
316316

317+
size = strlen(formatted);
318+
317319
if (size > 0) {
318320
flb_log_event_encoder_append_body_cstring(ctx->log_encoder, formatted);
319321

0 commit comments

Comments
 (0)