summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-01-13 22:06:31 +0000
committerWayne Davison <wayned@samba.org>2006-01-13 22:06:31 +0000
commit0ee6ca9800ef1f044a235804f07ab25f1e46e19d (patch)
treea5c48df3935ae5a22299a9632139a530776f804c /log.c
parent754302080786fe46c3ce431b6f96b796043e4f62 (diff)
downloadrsync-0ee6ca9800ef1f044a235804f07ab25f1e46e19d.tar.gz
rsync-0ee6ca9800ef1f044a235804f07ab25f1e46e19d.tar.bz2
rsync-0ee6ca9800ef1f044a235804f07ab25f1e46e19d.zip
Got rid of calls to the (soon to vanish) safe_fname() function.
Diffstat (limited to 'log.c')
-rw-r--r--log.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/log.c b/log.c
index 33ef5932..41d847f8 100644
--- a/log.c
+++ b/log.c
@@ -427,35 +427,31 @@ static void log_formatted(enum logcode code, char *format, char *op,
n = op;
break;
case 'f':
- n = safe_fname(f_name(file));
+ n = f_name(file);
if (am_sender && file->dir.root) {
pathjoin(buf2, sizeof buf2,
file->dir.root, n);
- /* The buffer from safe_fname() has more
- * room than MAXPATHLEN, so this is safe. */
+ clean_fname(buf2, 0);
if (fmt[1])
- strcpy(n, buf2);
+ strlcpy(n, buf2, MAXPATHLEN);
else
n = buf2;
- }
- clean_fname(n, 0);
+ } else
+ clean_fname(n, 0);
if (*n == '/')
n++;
break;
case 'n':
- n = safe_fname(f_name(file));
- if (S_ISDIR(file->mode)) {
- /* The buffer from safe_fname() has more
- * room than MAXPATHLEN, so this is safe. */
- strcat(n, "/");
- }
+ n = f_name(file);
+ if (S_ISDIR(file->mode))
+ strlcat(n, "/", MAXPATHLEN);
break;
case 'L':
if (hlink && *hlink) {
- n = safe_fname(hlink);
+ n = hlink;
strcpy(buf2, " => ");
} else if (S_ISLNK(file->mode) && file->u.link) {
- n = safe_fname(file->u.link);
+ n = file->u.link;
strcpy(buf2, " -> ");
} else {
n = "";