Clean up: Most cases in client_init() set clp->m_naddr to zero. Move
it to the common part of the function, and simplify the logic. This
will make adding IPv6 support here more straightforward.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
clp->m_exported = 0;
clp->m_count = 0;
+ clp->m_naddr = 0;
if (clp->m_type == MCL_SUBNETWORK) {
char *cp = strchr(clp->m_hostname, '/');
}
}
*cp = '/';
- clp->m_naddr = 0;
- } else if (!hp) {
- clp->m_naddr = 0;
- } else {
+ return;
+ }
+
+ if (hp) {
char **ap = hp->h_addr_list;
int i;