/* choose whether to skip a particular file */
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
{
- if (st->st_size != file->length) {
+ if (st->st_size != file->length)
return 0;
- }
if (link_dest) {
if (preserve_perms
&& (st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS))
: MD4_SUM_LENGTH) == 0;
}
- if (size_only) {
+ if (size_only)
return 1;
- }
- if (ignore_times) {
+ if (ignore_times)
return 0;
- }
- return (cmp_modtime(st->st_mtime,file->modtime) == 0);
+ return cmp_modtime(st->st_mtime, file->modtime) == 0;
}
-/**
+/*
* 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;
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;
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) {
phase++;
csum_length = SUM_LENGTH;
- ignore_times=1;
+ ignore_times = 1;
if (verbose > 2)
rprintf(FINFO,"generate_files phase=%d\n",phase);