]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mountd: trivial: name parameters for clarity
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 8 Mar 2010 20:02:26 +0000 (15:02 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 8 Mar 2010 20:02:26 +0000 (15:02 -0500)
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>
utils/mountd/cache.c

index 45397db66dcd8c66d36aad9f6608456ab16cf1de..6343325b106395767c1c781cbf71f76303564555 100644 (file)
@@ -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)