summaryrefslogtreecommitdiff
path: root/backup.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-07 06:59:37 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-07 06:59:37 +0000
commit8950ac03f8fd0fb645c7d2374195ea884d091f72 (patch)
tree705b70626cedad8fef430f5046dc73257d95d773 /backup.c
parent26ef00bd3c6c66240a4640aa54db1106d8b901fc (diff)
downloadrsync-8950ac03f8fd0fb645c7d2374195ea884d091f72.tar.gz
imported new snprintf.c from samba, got rid of slprintf
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 6604f0b0..a30e7ff8 100644
--- a/backup.c
+++ b/backup.c
@@ -39,7 +39,7 @@ static int make_simple_backup(char *fname)
return 0;
}
- slprintf(fnamebak,sizeof(fnamebak),"%s%s",fname,backup_suffix);
+ snprintf(fnamebak,sizeof(fnamebak),"%s%s",fname,backup_suffix);
if (do_rename(fname,fnamebak) != 0) {
/* cygwin (at least version b19) reports EINVAL */
if (errno != ENOENT && errno != EINVAL) {
@@ -92,9 +92,9 @@ static int make_bak_dir(char *fname,char *bak_path)
while(strncmp(bak_path,"./",2)==0) bak_path += 2;
if(bak_path[strlen(bak_path)-1]!='/') {
- slprintf(fullpath,sizeof(fullpath),"%s/",bak_path);
+ snprintf(fullpath,sizeof(fullpath),"%s/",bak_path);
} else {
- slprintf(fullpath,sizeof(fullpath),"%s",bak_path);
+ snprintf(fullpath,sizeof(fullpath),"%s",bak_path);
}
p=fullpath;
q=&fullpath[strlen(fullpath)]; /* End of bak_path string */
@@ -208,7 +208,7 @@ static int keep_backup(char *fname)
return 0;
}
- slprintf(keep_name, sizeof (keep_name), "%s/%s", backup_dir, fname);
+ snprintf(keep_name, sizeof (keep_name), "%s/%s", backup_dir, fname);
#ifdef HAVE_MKNOD