This fixes a bug with option errors not getting reported because the
write code gets called with bwlimit != 0 and bwlimit_writemax == 0.
#define ONE_SEC 1000000L /* # of microseconds in a second */
#define ONE_SEC 1000000L /* # of microseconds in a second */
return;
total_written += bytes_written;
return;
total_written += bytes_written;
continue;
n = len - total;
continue;
n = len - total;
- if (bwlimit && n > bwlimit_writemax)
+ if (bwlimit_writemax && n > bwlimit_writemax)
n = bwlimit_writemax;
cnt = write(fd, buf + total, n);
n = bwlimit_writemax;
cnt = write(fd, buf + total, n);