X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fexport%2Fclient.c;fp=support%2Fexport%2Fclient.c;h=46002558afc9d745a42258e12e7f2f1410676cd8;hp=9259180dd1d618f4a36196becade0751769df821;hb=6ff1fd42db18c657fbc5f81169a566b41d53e731;hpb=9bb85c5e8d2285f82367c75df5530a71a9a5a5f2 diff --git a/support/export/client.c b/support/export/client.c index 9259180..4600255 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -113,6 +113,18 @@ client_init(nfs_client *clp, const char *hname, const struct hostent *hp) return 1; } +static void +client_add(nfs_client *clp) +{ + nfs_client **cpp; + + cpp = &clientlist[clp->m_type]; + while (*cpp != NULL) + cpp = &((*cpp)->m_next); + clp->m_next = NULL; + *cpp = clp; +} + /* if canonical is set, then we *know* this is already a canonical name * so hostname lookup is avoided. * This is used when reading /proc/fs/nfs/exports @@ -208,20 +220,6 @@ client_dup(nfs_client *clp, struct hostent *hp) return new; } -void -client_add(nfs_client *clp) -{ - nfs_client **cpp; - - if (clp->m_type < 0 || clp->m_type >= MCL_MAXTYPES) - xlog(L_FATAL, "unknown client type in client_add"); - cpp = clientlist + clp->m_type; - while (*cpp) - cpp = &((*cpp)->m_next); - clp->m_next = NULL; - *cpp = clp; -} - void client_release(nfs_client *clp) {