Re: [PATCH] getaddrinfo_a.3: Use C99 style to declare loop counter variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Alex,

On 9/12/20 1:09 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>

Thanks. Patch applied.

Cheers,

Michael

> ---
>  man3/getaddrinfo_a.3 | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3
> index 3a8ddc98e..ca108df1a 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]);
>  
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux