small issue in getifaddrs(3) man page

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

 



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



[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