summaryrefslogtreecommitdiff
path: root/rsync.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-05-10 07:25:40 +0000
committerAndrew Tridgell <tridge@samba.org>1998-05-10 07:25:40 +0000
commit7a6421fa764dd0f609e2a5024ec8b3bc577575a1 (patch)
treefcbe78e8a2679eabc84db25f46bcb4a49da855b4 /rsync.c
parent2c91d3d3110287ccc14a42031228cf3dca292fd3 (diff)
downloadrsync-7a6421fa764dd0f609e2a5024ec8b3bc577575a1.tar.gz
split the options parsing code into options.c
added the --port and --config options use strlcpy() instead of strncpy() some cleanups and formatting changes
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/rsync.c b/rsync.c
index 9d3b1c56..950d575f 100644
--- a/rsync.c
+++ b/rsync.c
@@ -111,7 +111,7 @@ static int delete_file(char *fname)
if (strcmp(dname,".")==0 ||
strcmp(dname,"..")==0)
continue;
- strncpy(buf, fname, (MAXPATHLEN-strlen(dname))-2);
+ strlcpy(buf, fname, (MAXPATHLEN-strlen(dname))-2);
strcat(buf, "/");
strcat(buf, dname);
buf[MAXPATHLEN-1] = 0;
@@ -976,8 +976,7 @@ void send_files(struct file_list *flist,int f_out,int f_in)
fname[0] = 0;
if (file->basedir) {
- strncpy(fname,file->basedir,MAXPATHLEN-1);
- fname[MAXPATHLEN-1] = 0;
+ strlcpy(fname,file->basedir,MAXPATHLEN-1);
if (strlen(fname) == MAXPATHLEN-1) {
io_error = 1;
rprintf(FERROR, "send_files failed on long-named directory %s\n",