summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/fetch/fetch.c')
-rw-r--r--usr.bin/fetch/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 087d09c..00bcc76 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -130,7 +130,7 @@ stat_eta(struct xferstat *xs)
elapsed = xs->last.tv_sec - xs->start.tv_sec;
received = xs->rcvd - xs->offset;
expected = xs->size - xs->rcvd;
- eta = (elapsed * expected) / received;
+ eta = (long)((double)elapsed * expected / received);
if (eta > 3600) {
fprintf(stderr, "%02ld:", eta / 3600);
eta %= 3600;
OpenPOWER on IntegriCloud