getaddrinfo_a.3: Use C99 style to declare loop counter variables

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2020-09-12 01:09:18 +02:00 committed by Michael Kerrisk
parent ae85f653e4
commit ec8b00033c
1 changed files with 4 additions and 4 deletions

View File

@ -495,7 +495,7 @@ static void
wait_requests(void)
{
char *id;
int i, ret, n;
int ret, n;
struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));
/* NULL elements are ignored by gai_suspend(). */
@ -516,7 +516,7 @@ wait_requests(void)
return;
}
for (i = 0; i < nreqs; i++) {
for (int i = 0; i < nreqs; i++) {
if (wait_reqs[i] == NULL)
continue;
@ -554,11 +554,11 @@ cancel_requests(void)
static void
list_requests(void)
{
int i, ret;
int ret;
char host[NI_MAXHOST];
struct addrinfo *res;
for (i = 0; i < nreqs; i++) {
for (int i = 0; i < nreqs; i++) {
printf("[%02d] %s: ", i, reqs[i]\->ar_name);
ret = gai_error(reqs[i]);