Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d059d4
)
Got rid of a superfluous static buffer.
author
Wayne Davison
<wayned@samba.org>
Mon, 20 Sep 2004 05:01:38 +0000
(
05:01
+0000)
committer
Wayne Davison
<wayned@samba.org>
Mon, 20 Sep 2004 05:01:38 +0000
(
05:01
+0000)
backup.c
patch
|
blob
|
blame
|
history
diff --git
a/backup.c
b/backup.c
index
1fcb82a
..
ca43386
100644
(file)
--- 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)
{
/* 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 (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");
}
rprintf(FERROR, "backup filename too long\n");