mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
m) Fix: compile test_rechist error (#425)
error: 'for' loop initial declarations are only allowed in C99 mode Co-authored-by: wangfuyu <ivanfywang@gmail.com>
This commit is contained in:
parent
a5b89b62b5
commit
5c669eea50
1 changed files with 13 additions and 12 deletions
|
@ -205,31 +205,32 @@ test6 (void)
|
||||||
lsquic_rechist_t rechist;
|
lsquic_rechist_t rechist;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
long int time = 12087061905875;
|
long int time = 12087061905875;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
lsquic_rechist_init(&rechist, 0, 0);
|
lsquic_rechist_init(&rechist, 0, 0);
|
||||||
|
|
||||||
for (int i = 0; i <= 3; i++)
|
for (i = 0; i <= 3; i++)
|
||||||
lsquic_rechist_received(&rechist, i, (time += (i*10)));
|
lsquic_rechist_received(&rechist, i, (time += (i * 10)));
|
||||||
lsquic_rechist_stop_wait(&rechist, 2);
|
lsquic_rechist_stop_wait(&rechist, 2);
|
||||||
|
|
||||||
lsquic_rechist_received(&rechist, 4, (time += 10));
|
lsquic_rechist_received(&rechist, 4, (time += 10));
|
||||||
|
|
||||||
lsquic_rechist_stop_wait(&rechist, 3);
|
lsquic_rechist_stop_wait(&rechist, 3);
|
||||||
|
|
||||||
lsquic_rechist_received(&rechist, 5, (time += 10));
|
lsquic_rechist_received(&rechist, 5, (time += 10));
|
||||||
|
|
||||||
lsquic_rechist_stop_wait(&rechist, 3);
|
lsquic_rechist_stop_wait(&rechist, 3);
|
||||||
|
|
||||||
lsquic_rechist_received(&rechist, 6, (time += 10));
|
lsquic_rechist_received(&rechist, 6, (time += 10));
|
||||||
|
|
||||||
lsquic_rechist_stop_wait(&rechist, 9);
|
lsquic_rechist_stop_wait(&rechist, 9);
|
||||||
|
|
||||||
lsquic_rechist_received(&rechist, 7, (time += 10));
|
lsquic_rechist_received(&rechist, 7, (time += 10));
|
||||||
lsquic_rechist_received(&rechist, 8, (time += 10));
|
lsquic_rechist_received(&rechist, 8, (time += 10));
|
||||||
lsquic_rechist_received(&rechist, 9, (time += 10));
|
lsquic_rechist_received(&rechist, 9, (time += 10));
|
||||||
|
|
||||||
rechist2str(&rechist, buf, sizeof(buf));
|
rechist2str(&rechist, buf, sizeof(buf));
|
||||||
|
|
||||||
lsquic_rechist_cleanup(&rechist);
|
lsquic_rechist_cleanup(&rechist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue