diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-05-10 07:25:40 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-05-10 07:25:40 +0000 |
commit | 7a6421fa764dd0f609e2a5024ec8b3bc577575a1 (patch) | |
tree | fcbe78e8a2679eabc84db25f46bcb4a49da855b4 /rsync.c | |
parent | 2c91d3d3110287ccc14a42031228cf3dca292fd3 (diff) | |
download | rsync-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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", |