linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Michael Galassi <michael@galassi.us>
Cc: linux-man <linux-man@vger.kernel.org>
Subject: Re: small issue in getifaddrs(3) man page
Date: Mon, 2 Mar 2020 08:00:00 +0100	[thread overview]
Message-ID: <CAKgNAkhnu4LDf5fprcqLSft5q3YrvoQRi9XjCoxqSEF5BMxGrg@mail.gmail.com> (raw)
In-Reply-To: <CADFiD2+vbh-rhbj3G8z5F46R6cP1BSOVfpFiJju=EM00Q15-Ug@mail.gmail.com>

Hello Michael,

On Fri, 28 Feb 2020 at 16:34, Michael Galassi <michael@galassi.us> wrote:
>
> Hi,
>
> The getifaddrs(3) man page has some sample code which includes a for
> loop wich initializes and increments an in named "n" which is never
> used.  This is slightly confusing (but in no way wrong).  The page
> would be clearer if this variable declaration, initialization, and
> increment were removed.

Agreed. (And mea culpa.) I've made the change as you suggest. Thanks
for the report!

Cheers,

Michael

>
> The two lines in question are:
>            int family, s, n;
> ...
>            for (ifa = ifaddr, n = 0; ifa != NULL; ifa = ifa->ifa_next, n++) {
>
> Thanks.
>
> -michael



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

      reply	other threads:[~2020-03-02  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 15:33 small issue in getifaddrs(3) man page Michael Galassi
2020-03-02  7:00 ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKgNAkhnu4LDf5fprcqLSft5q3YrvoQRi9XjCoxqSEF5BMxGrg@mail.gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=michael@galassi.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).