Skip to content

Commit 1c82ad4

Browse files
committed
make compatible for old compiler
1 parent 25b78bb commit 1c82ad4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/out_opentelemetry/opentelemetry.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ static int flush_to_otel(struct opentelemetry_context *ctx,
713713
size_t kv_index;
714714
struct mk_list *kv_head;
715715
struct flb_kv *kv;
716+
int index;
716717

717718
void *body;
718719
unsigned len;
@@ -741,7 +742,7 @@ static int flush_to_otel(struct opentelemetry_context *ctx,
741742
flb_errno();
742743
return -1;
743744
}
744-
for(int index = 0; index < kv_size; index++) {
745+
for(index = 0; index < kv_size; index++) {
745746
attributes_list[index] = &attributes[index];
746747
}
747748

@@ -781,7 +782,7 @@ static int flush_to_otel(struct opentelemetry_context *ctx,
781782

782783
flb_free(body);
783784
flb_free(resource_log.resource);
784-
for (int index = 0; index < kv_size; index++) {
785+
for (index = 0; index < kv_size; index++) {
785786
flb_free(attributes[index].value);
786787
}
787788
flb_free(attributes);

0 commit comments

Comments
 (0)