linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* small issue in getifaddrs(3) man page
@ 2020-02-28 15:33 Michael Galassi
  2020-03-02  7:00 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Galassi @ 2020-02-28 15:33 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-man

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.

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

Thanks.

-michael

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-02  7:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 15:33 small issue in getifaddrs(3) man page Michael Galassi
2020-03-02  7:00 ` Michael Kerrisk (man-pages)

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).