Instead of a single function that can handle both AF_INET and AF_INET6
addresses, two separate functions might be cleaner.
The original plan was to keep code redundancy at a minimum, but the
resulting code was cumbersome at best. I think I've traded a little
extra code for something that will be much easier to read, understand,
and maintain.
I've also eliminated the "#if / #endif" instances inside the functions.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>