Hello Michael, On Fri, 28 Feb 2020 at 16:34, Michael Galassi <michael@xxxxxxxxxx> 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/