aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <colomar.6.4.3@gmail.com>2020-09-12 01:09:18 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-09-12 08:38:20 +0200
commitec8b00033c6b7e7c20e900334f4e9af391d823fe (patch)
treedabc6a22ea861fe265226d9bf5f331b67c4a9718
parentae85f653e42ebd1c229ba15f1586428e5f2581a5 (diff)
downloadman-pages-ec8b00033c6b7e7c20e900334f4e9af391d823fe.tar.gz
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>
-rw-r--r--man3/getaddrinfo_a.38
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3
index 3a8ddc98ea..ca108df1ad 100644
--- a/man3/getaddrinfo_a.3
+++ b/man3/getaddrinfo_a.3
@@ -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]);