Skip to content

Commit

Permalink
make compatible for old compiler
Browse files Browse the repository at this point in the history
Signed-off-by: carsonzhu <carsonzhu@tencent.com>
  • Loading branch information
Frefreak committed Mar 22, 2023
1 parent 25b78bb commit 1b62a1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/out_opentelemetry/opentelemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ static int flush_to_otel(struct opentelemetry_context *ctx,
size_t kv_index;
struct mk_list *kv_head;
struct flb_kv *kv;
int index;

void *body;
unsigned len;
Expand Down Expand Up @@ -741,7 +742,7 @@ static int flush_to_otel(struct opentelemetry_context *ctx,
flb_errno();
return -1;
}
for(int index = 0; index < kv_size; index++) {
for(index = 0; index < kv_size; index++) {
attributes_list[index] = &attributes[index];
}

Expand Down Expand Up @@ -781,7 +782,7 @@ static int flush_to_otel(struct opentelemetry_context *ctx,

flb_free(body);
flb_free(resource_log.resource);
for (int index = 0; index < kv_size; index++) {
for (index = 0; index < kv_size; index++) {
flb_free(attributes[index].value);
}
flb_free(attributes);
Expand Down

0 comments on commit 1b62a1a

Please sign in to comment.