diff options
author | Wayne Davison <wayned@samba.org> | 2006-01-13 22:06:31 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-01-13 22:06:31 +0000 |
commit | 0ee6ca9800ef1f044a235804f07ab25f1e46e19d (patch) | |
tree | a5c48df3935ae5a22299a9632139a530776f804c /log.c | |
parent | 754302080786fe46c3ce431b6f96b796043e4f62 (diff) | |
download | rsync-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.c | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -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 = ""; |