aboutsummaryrefslogtreecommitdiffstats
path: root/backup.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-09-20 05:01:38 +0000
committerWayne Davison <wayned@samba.org>2004-09-20 05:01:38 +0000
commitfb22c2774d813e5603747937d5eb3c719de20be7 (patch)
tree4e890ce525ea98786795b384334d8b1a6b4a4884 /backup.c
parent7d059d4c37e8b21260b8a76db4e1d4c3e08b9aa5 (diff)
downloadandroid_external_rsync-fb22c2774d813e5603747937d5eb3c719de20be7.tar.gz
android_external_rsync-fb22c2774d813e5603747937d5eb3c719de20be7.tar.bz2
android_external_rsync-fb22c2774d813e5603747937d5eb3c719de20be7.zip
Got rid of a superfluous static buffer.
Diffstat (limited to 'backup.c')
-rw-r--r--backup.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/backup.c b/backup.c
index 1fcb82a6..ca433867 100644
--- a/backup.c
+++ b/backup.c
@@ -38,16 +38,14 @@ extern int safe_symlinks;
/* make a complete pathname for backup file */
char *get_backup_name(char *fname)
{
- static char fnamebak[MAXPATHLEN];
-
if (backup_dir) {
if (stringjoin(backup_dir_buf + backup_dir_len, backup_dir_remainder,
fname, backup_suffix, NULL) < backup_dir_remainder)
return backup_dir_buf;
} else {
- if (stringjoin(fnamebak, sizeof fnamebak,
- fname, backup_suffix, NULL) < sizeof fnamebak)
- return fnamebak;
+ if (stringjoin(backup_dir_buf, MAXPATHLEN,
+ fname, backup_suffix, NULL) < MAXPATHLEN)
+ return backup_dir_buf;
}
rprintf(FERROR, "backup filename too long\n");