From 1669020d5c362a7132b946dc4df705572a94d964 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 26 Oct 2022 12:00:27 +1100 Subject: [PATCH] editorial --- libpathmap-0.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libpathmap-0.c b/libpathmap-0.c index 5628030..b327bb9 100644 --- a/libpathmap-0.c +++ b/libpathmap-0.c @@ -22,7 +22,7 @@ * Pathnames are passed in to the library via the environment variable * PATHMAPNOT as a colon separated list of pathnames that are not to * be mapped. The first value of PATHMAPNOT is used as prefix to add - * to all paths except the ones in the list (the first inlcuded). + * to all paths except the ones in the list (the first included). * * The given pathnames are loaded into a sorted table, offering * O[log(n)] lookup complexity, and the map prefix is also held @@ -106,9 +106,10 @@ static int binsearch(const char *path) { } // Utility function to lookup a matching prefix for the given path. If -// one is found, then 0 is returned. Otherwise memory is allocated for -// a new string that consists of the root path followed by the given -// path. +// none is found, then 0 is returned. Otherwise memory is allocated +// (malloc) for a new string that consists of the root path followed +// by the given path. Note that prefixing only applies to absolute +// paths. static char *maybe_add_prefix(const char *path) { fprintf( stderr, "libpathmap: check %s\n", path ); if ( prefix.count > 0 && *path == '/' ) { -- 2.47.2