diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2010-03-08 15:02:26 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-03-08 15:02:26 -0500 |
commit | 70c59e231e7257ac93b68ba4b844f8d10a6af4a8 (patch) | |
tree | 3bd44a45a0cc9199af9018612c6364cb07bb8fd9 /utils/mountd/cache.c | |
parent | a064fde8c2615333227de97d159bb338d4ac640d (diff) | |
download | nfs-utils-70c59e231e7257ac93b68ba4b844f8d10a6af4a8.tar.gz nfs-utils-70c59e231e7257ac93b68ba4b844f8d10a6af4a8.tar.xz nfs-utils-70c59e231e7257ac93b68ba4b844f8d10a6af4a8.zip |
mountd: trivial: name parameters for clarity
Part of the reason for the previous bug was confusion between "subpath"
and "path"; which is the shorter path, and which the longer?
"child" and "parent" seem less ambiguous.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mountd/cache.c')
-rw-r--r-- | utils/mountd/cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 45397db..6343325 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -614,12 +614,12 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex return qword_eol(f); } -static int is_subdirectory(char *subpath, char *path) +static int is_subdirectory(char *child, char *parent) { - int l = strlen(path); + int l = strlen(parent); - return strcmp(subpath, path) == 0 - || (strncmp(subpath, path, l) == 0 && subpath[l] == '/'); + return strcmp(child, parent) == 0 + || (strncmp(child, parent, l) == 0 && child[l] == '/'); } static int path_matches(nfs_export *exp, char *path) |