X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b33b791e6ba823589bdee416b91ad9278cb36ef2..f855a7d01ab8401a307bb02cdcdee546df3e2423:/main.c diff --git a/main.c b/main.c index 5bd5b8a1..807409e3 100644 --- a/main.c +++ b/main.c @@ -23,8 +23,6 @@ time_t starttime = 0; struct stats stats; -extern int csum_length; - extern int verbose; static void report(int f) @@ -42,8 +40,7 @@ static void report(int f) if (f == -1 || !am_sender) return; } - send_stats = verbose || - ((remote_version >= 20) && (PROTOCOL_VERSION >= 20)); + send_stats = verbose || (remote_version >= 20); if (am_server) { if (am_sender && send_stats) { int64 w; @@ -71,7 +68,7 @@ static void report(int f) if (do_stats) { if (!am_sender && !send_stats) { /* missing the bytes written by the generator */ - rprintf(FINFO, "\nCannot show stats as receiver because protocol version is less than 20\n"); + rprintf(FINFO, "\nCannot show stats as receiver because remote protocol version is less than 20\n"); rprintf(FINFO, "Use --stats -v to show stats\n"); return; } @@ -209,7 +206,7 @@ static char *get_local_name(struct file_list *flist,char *name) return name; } - if (flist->count == 1) + if (flist->count <= 1) return name; if (do_mkdir(name,0777 & ~orig_umask) != 0) { @@ -356,8 +353,8 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[]) recv_exclude_list(f_in); flist = recv_file_list(f_in); - if (!flist || flist->count == 0) { - rprintf(FERROR,"server_recv: nothing to do\n"); + if (!flist) { + rprintf(FERROR,"server_recv: recv_file_list error\n"); exit_cleanup(RERR_FILESELECT); }