X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/5b986297479dcdb1151a92c393af2a3ecb6a74bc..a92d6ff13c78b0ec3c86974dc93d85e23c4a180a:/io.c diff --git a/io.c b/io.c index 0948416f..b69ae00b 100644 --- a/io.c +++ b/io.c @@ -1011,7 +1011,7 @@ static void sleep_for_bwlimit(int bytes_written) #define ONE_SEC 1000000L /* # of microseconds in a second */ - if (!bwlimit) + if (!bwlimit_writemax) return; total_written += bytes_written; @@ -1091,7 +1091,7 @@ static void writefd_unbuffered(int fd,char *buf,size_t len) continue; n = len - total; - if (bwlimit && n > bwlimit_writemax) + if (bwlimit_writemax && n > bwlimit_writemax) n = bwlimit_writemax; cnt = write(fd, buf + total, n);