summaryrefslogtreecommitdiff
path: root/backup.c
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2010-03-17 01:03:32 -0400
committerWayne Davison <wayned@samba.org>2010-04-24 09:56:34 -0700
commit0b8a9bd69d1e4003bdadb663581533681adba808 (patch)
tree232151ed96025738a2ebaacb022bd5a23fca0558 /backup.c
parent7a3ce973c370322251a5f402b80a02457efa682d (diff)
downloadrsync-0b8a9bd69d1e4003bdadb663581533681adba808.tar.gz
Minor restructuring/clarification to get_backup_name.
(Tweaked by Wayne to follow his preferred style.)
Diffstat (limited to 'backup.c')
-rw-r--r--backup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/backup.c b/backup.c
index 0ef4d9ec..6dbc17a0 100644
--- a/backup.c
+++ b/backup.c
@@ -160,13 +160,13 @@ char *get_backup_name(const char *fname)
/* copy fname into backup_dir_buf while validating the dirs. */
if (copy_valid_path(fname))
return backup_dir_buf;
+ /* copy_valid_path() has printed an error message. */
return NULL;
- } else {
- if (stringjoin(backup_dir_buf, MAXPATHLEN,
- fname, backup_suffix, NULL) < MAXPATHLEN)
- return backup_dir_buf;
}
+ if (stringjoin(backup_dir_buf, MAXPATHLEN, fname, backup_suffix, NULL) < MAXPATHLEN)
+ return backup_dir_buf;
+
rprintf(FERROR, "backup filename too long\n");
return NULL;
}