Skip to content

Commit

Permalink
Minor restructuring/clarification to get_backup_name.
Browse files Browse the repository at this point in the history
(Tweaked by Wayne to follow his preferred style.)
  • Loading branch information
mattmccutchen authored and Wayne Davison committed Apr 24, 2010
1 parent 7a3ce97 commit 0b8a9bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0b8a9bd

Please sign in to comment.