Skip to content

Commit

Permalink
out_forward: initialize the array with {0} not {}.
Browse files Browse the repository at this point in the history
Namely C99 requires programmers to use `{0}` to initialize an array.

The syntax `{}` is only for C++ and causes an compilation error on
VC++ (GCC accepts it, though).

Signed-off-by: Fujimoto Seiji <[email protected]>
  • Loading branch information
Fujimoto Seiji authored and edsiper committed Dec 24, 2018
1 parent 7c83d8e commit 5af8c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/out_forward/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static int secure_forward_ping(struct flb_upstream_conn *u_conn,
static int secure_forward_pong(char *buf, int buf_size)
{
int ret;
char msg[32] = {};
char msg[32] = {0};
size_t off = 0;
msgpack_unpacked result;
msgpack_object root;
Expand Down

0 comments on commit 5af8c23

Please sign in to comment.