X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ff8b29b8c62f377ede40fbf0cbbaa428bd8df60a..c8e78d87ad420c06f6b1688ef8d2e86a01c6bc76:/main.c diff --git a/main.c b/main.c index 638dd75d..b4c514fd 100644 --- a/main.c +++ b/main.c @@ -48,8 +48,8 @@ static void report(int f) out = write_total(); tsize = total_size; } else { - in = read_longint(f); out = read_longint(f); + in = read_longint(f); tsize = read_longint(f); } @@ -494,6 +494,11 @@ int main(int argc,char *argv[]) starttime = time(NULL); am_root = (getuid() == 0); + if (argc < 2) { + usage(FERROR); + exit(1); + } + /* we set a 0 umask so that correct file permissions can be carried across */ orig_umask = (int)umask(0);