aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-17 17:28:03 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-17 17:28:03 +0300
commit656190b0a063686b9bd675bbffe43fbebf4aacab (patch)
tree3f0336fb2080b938fc447ed4c155769be0211fb2 /src/io.c
parentade8d0b4e9c206ab67dc8ef2006e8070011aae83 (diff)
downloadaports-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.bz2
aports-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.xz
io: get rid of APK_PROGRESS_SCALE
no need to muldiv all the time, just pass the current amount of bytes done, and let callbacks use that directly.
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/io.c b/src/io.c
index 20ea28a19f..3b19c639c2 100644
--- a/src/io.c
+++ b/src/io.c
@@ -156,8 +156,8 @@ size_t apk_istream_splice(void *stream, int fd, size_t size,
}
while (done < size) {
- if (done != 0 && cb != NULL)
- cb(cb_ctx, muldiv(APK_PROGRESS_SCALE, done, size));
+ if (cb != NULL)
+ cb(cb_ctx, done);
togo = size - done;
if (togo > bufsz)