diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-15 13:03:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-15 20:20:30 -0400 |
commit | 287f6cb128c890e31faa951be6d42cd6801f4e59 (patch) | |
tree | ec88037acbe9bb7474a8acc2dc8593d8e63bf53b /src | |
parent | 4b800408fa85ce0ac81a308c42d654b3357180d4 (diff) | |
download | tor-287f6cb128c890e31faa951be6d42cd6801f4e59.tar tor-287f6cb128c890e31faa951be6d42cd6801f4e59.tar.gz |
Fix up some comment issues spotted by rransom
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat.c | 7 | ||||
-rw-r--r-- | src/common/util.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 3c5e9385e..fc066da68 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -1481,7 +1481,12 @@ get_parent_directory(char *fname) fname += 2; } #endif - /* Now we want to remove the final character that */ + /* Now we want to remove all path-separators at the end of the string, + * and to remove the end of the string starting with the path separator + * before the last non-path-separator. In perl, this would be + * s#[/]*$##; s#/[^/]*$##; + * on a unixy platform. + */ cp = fname + strlen(fname); at_end = 1; while (--cp > fname) { diff --git a/src/common/util.c b/src/common/util.c index d84ed9c00..0e739f212 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1664,10 +1664,10 @@ file_status(const char *fname) return FN_ERROR; } -/** Check whether dirname exists and is private. If yes return 0. If - * it does not exist, and check&CPD_CREATE is set, try to create it +/** Check whether <b>dirname</b> exists and is private. If yes return 0. If + * it does not exist, and <b>check</b>&CPD_CREATE is set, try to create it * and return 0 on success. If it does not exist, and - * check&CPD_CHECK, and we think we can create it, return 0. Else + * <b>check</b>&CPD_CHECK, and we think we can create it, return 0. Else * return -1. If CPD_GROUP_OK is set, then it's okay if the directory * is group-readable, but in all cases we create the directory mode 0700. * If CPD_CHECK_MODE_ONLY is set, then we don't alter the directory permissions |