Skip to content

Commit f0c3760

Browse files
committed
fix: move variable to C89 compliance
1 parent 73a0d6f commit f0c3760

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/in_kubernetes_events/kubernetes_events.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,15 @@ static int process_http_chunk(struct k8s_events* ctx, struct flb_http_client *c,
749749
char *search_start;
750750
size_t remaining;
751751
flb_sds_t working_buffer = NULL;
752+
size_t buffer_len;
752753

753754
/*
754755
* Prepend any buffered incomplete data from previous chunks.
755756
* HTTP chunked encoding can split JSON objects across chunk boundaries,
756757
* so we need to buffer incomplete data until we find a complete JSON line.
757758
*/
758759
if (ctx->chunk_buffer != NULL) {
759-
size_t buffer_len = flb_sds_len(ctx->chunk_buffer);
760+
buffer_len = flb_sds_len(ctx->chunk_buffer);
760761
flb_plg_debug(ctx->ins, "prepending %zu bytes from chunk_buffer to %zu new bytes",
761762
buffer_len, c->resp.payload_size);
762763
working_buffer = flb_sds_cat(ctx->chunk_buffer, c->resp.payload, c->resp.payload_size);

0 commit comments

Comments
 (0)