aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-18 20:17:05 +0000
committerWayne Davison <wayned@samba.org>2005-02-18 20:17:05 +0000
commitb485e0c16ceee1e157f412bf2e93e4986d95b605 (patch)
tree1af1bb6f44a6b9f7379a99a99d1ee36be01aae00 /util.c
parentbc1fac96486956f7b1b2185aa4296955289f98cb (diff)
downloadandroid_external_rsync-b485e0c16ceee1e157f412bf2e93e4986d95b605.tar.gz
android_external_rsync-b485e0c16ceee1e157f412bf2e93e4986d95b605.tar.bz2
android_external_rsync-b485e0c16ceee1e157f412bf2e93e4986d95b605.zip
Fixed/improved the comment before safe_name().
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util.c b/util.c
index 3e783e4d..42b5e100 100644
--- a/util.c
+++ b/util.c
@@ -876,11 +876,11 @@ int pop_dir(char *dir)
return 1;
}
-/**
- * Return the filename, turning any newlines into '?'s. This ensures that
- * outputting it on a line of its own cannot generate an empty line. This
- * function can handle only 2 names at a time!
- **/
+/* Return the filename, turning any non-printable characters into '?'s.
+ * This ensures that outputting it on a line of its own cannot generate an
+ * empty line. This function can return only MAX_SAFE_NAMES values at a
+ * time! The returned value can be longer than MAXPATHLEN (because we
+ * may be trying to output an error about a too-long filename)! */
const char *safe_fname(const char *fname)
{
#define MAX_SAFE_NAMES 4