Skip to content

Commit 0548505

Browse files
committed
fixup! http_server/health: Implement throughput health check
Fix style Signed-off-by: Thiago Padilha <[email protected]>
1 parent 08c0215 commit 0548505

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/http_server/api/v1/health.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ static int check_throughput_health(uint64_t in_records,
319319
struct flb_hs_throughput_sample *prev;
320320
struct flb_hs_throughput_sample *sample;
321321
struct flb_hs_throughput_sample *last_sample = NULL;
322+
int count;
322323
bool healthy;
323324
bool rv;
324325

@@ -383,13 +384,14 @@ static int check_throughput_health(uint64_t in_records,
383384
}
384385
}
385386

386-
int count = 0;
387+
count = 0;
387388
mk_list_foreach_safe_r(head, tmp, sample_list) {
388389
entry = mk_list_entry(head, struct flb_hs_throughput_sample, _head);
389390
if (count == sample_count) {
390391
mk_list_del(&entry->_head);
391392
flb_free(entry);
392-
} else {
393+
}
394+
else {
393395
count++;
394396
}
395397
}

0 commit comments

Comments
 (0)