arglist args;
/* Bandwidth limit */
-off_t limitbw = 0;
+off_t limit_rate = 0;
/* Name of current file being transferred. */
char *curfile;
speed = strtod(optarg, &endp);
if (speed <= 0 || *endp != '\0')
usage();
- limitbw = speed * 1024;
+ limit_rate = speed * 1024;
break;
case 'p':
pflag = 1;
haderr = result >= 0 ? EIO : errno;
statbytes += result;
}
- if (limitbw)
+ if (limit_rate)
bwlimit(amt);
}
if (showprogress)
return;
lamt *= 8;
- wait = (double)1000000L * lamt / limitbw;
+ wait = (double)1000000L * lamt / limit_rate;
bwstart.tv_sec = wait / 1000000L;
bwstart.tv_usec = wait % 1000000L;
statbytes += j;
} while (amt > 0);
- if (limitbw)
+ if (limit_rate)
bwlimit(4096);
if (count == bp->cnt) {