X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Fexport%2Fclient.c;h=686c7448c425171ee6fec5a322d93231f07796e1;hb=4f7fc41f6324daad94c37e9327567d27a0d50afe;hp=57176d880077a53e40b0e27532643ecd7b4e2620;hpb=5bf7310498337de9c05f7b6780b29a3ef5cf6bac;p=nfs-utils.git diff --git a/support/export/client.c b/support/export/client.c index 57176d8..686c744 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -6,13 +6,16 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include #include #include #include +#include #include #include "xmalloc.h" #include "misc.h" @@ -262,11 +265,11 @@ client_compose(struct in_addr addr) return name; } -int +int client_member(char *client, char *name) { /* check if "client" (a ',' separated list of names) - * contains 'name' as a member + * contains 'name' as a member */ int l = strlen(name); while (*client) { @@ -282,7 +285,7 @@ client_member(char *client, char *name) } -int +int name_cmp(char *a, char *b) { /* compare strings a and b, but only upto ',' in a */ @@ -326,6 +329,7 @@ add_name(char *old, char *add) strcat(new, ","); strcat(new, cp); } + free(old); return new; }