X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/84acca07aeff796f9d0324f382e3eca66b660ffe..bb91a624f1f38f4e06ce61901dda54c2ffc52705:/generator.c diff --git a/generator.c b/generator.c index fa2d9eab..6b8a9a2d 100644 --- a/generator.c +++ b/generator.c @@ -258,15 +258,16 @@ static void generate_and_send_sums(struct map_struct *buf, size_t len, int f_out -/** +/* * Acts on file number @p i from @p flist, whose name is @p fname. * * First fixes up permissions, then generates checksums for the file. * * @note This comment was added later by mbp who was trying to work it * out. It might be wrong. - **/ -void recv_generator(char *fname, struct file_struct *file, int i, int f_out) + */ +static void recv_generator(char *fname, struct file_struct *file, int i, + int f_out) { int fd; STRUCT_STAT st; @@ -482,7 +483,8 @@ void recv_generator(char *fname, struct file_struct *file, int i, int f_out) return; } - if (update_only && cmp_modtime(st.st_mtime,file->modtime)>0 && fnamecmp == fname) { + if (update_only && fnamecmp == fname + && cmp_modtime(st.st_mtime, file->modtime) > 0) { if (verbose > 1) rprintf(FINFO,"%s is newer\n",fname); return; @@ -544,7 +546,7 @@ void recv_generator(char *fname, struct file_struct *file, int i, int f_out) void generate_files(int f, struct file_list *flist, char *local_name) { int i; - int phase=0; + int phase = 0; char fbuf[MAXPATHLEN]; if (verbose > 2) { @@ -587,7 +589,7 @@ void generate_files(int f, struct file_list *flist, char *local_name) phase++; csum_length = SUM_LENGTH; - ignore_times=1; + ignore_times = 1; if (verbose > 2) rprintf(FINFO,"generate_files phase=%d\n",phase);