From fb22c2774d813e5603747937d5eb3c719de20be7 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 20 Sep 2004 05:01:38 +0000 Subject: [PATCH] Got rid of a superfluous static buffer. --- backup.c | 8 +++----- 1 file 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"); -- 2.34.1