Commit 0b8a9bd6 authored by Matt McCutchen's avatar Matt McCutchen Committed by Wayne Davison

Minor restructuring/clarification to get_backup_name.

(Tweaked by Wayne to follow his preferred style.)
parent 7a3ce973
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment