Added some more "const" prefixes to some "char *" vars.

This commit is contained in:
Wayne Davison committed 2006-11-28 19:31:41 +00:00
1 parent d521e1c2a1
commit 45d8bfe09e
2 files changed
+7 -7

No files matched your search

+6 -6
View File
@@ -35,7 +35,7 @@ extern int preserve_links;
extern int safe_symlinks;
/* make a complete pathname for backup file */
char *get_backup_name(char *fname)
char *get_backup_name(const char *fname)
{
if (backup_dir) {
if (stringjoin(backup_dir_buf + backup_dir_len, backup_dir_remainder,
@@ -52,10 +52,10 @@ char *get_backup_name(char *fname)
}
/* simple backup creates a backup with a suffix in the same directory */
static int make_simple_backup(char *fname)
static int make_simple_backup(const char *fname)
{
int rename_errno;
char *fnamebak = get_backup_name(fname);
const char *fnamebak = get_backup_name(fname);
if (!fnamebak)
return 0;
@@ -158,7 +158,7 @@ static int make_bak_dir(char *fullpath)
}
/* robustly move a file, creating new directory structures if necessary */
static int robust_move(char *src, char *dst)
static int robust_move(const char *src, char *dst)
{
if (robust_rename(src, dst, NULL, 0755) < 0
&& (errno != ENOENT || make_bak_dir(dst) < 0
@@ -170,7 +170,7 @@ static int robust_move(char *src, char *dst)
/* If we have a --backup-dir, then we get here from make_backup().
* We will move the file to be deleted into a parallel directory tree. */
static int keep_backup(char *fname)
static int keep_backup(const char *fname)
{
STRUCT_STAT st;
struct file_struct *file;
@@ -274,7 +274,7 @@ static int keep_backup(char *fname)
/* main backup switch routine */
int make_backup(char *fname)
int make_backup(const char *fname)
{
if (backup_dir)
return keep_backup(fname);
+1 -1
View File
@@ -718,7 +718,7 @@ static struct file_struct *receive_file_entry(struct file_list *flist,
* statting directories if we're not recursing, but this is not a very
* important case. Some systems may not have d_type.
**/
struct file_struct *make_file(char *fname, struct file_list *flist,
struct file_struct *make_file(const char *fname, struct file_list *flist,
STRUCT_STAT *stp, unsigned short flags,
int filter_level)
{