diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 17:28:03 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 17:28:03 +0300 |
commit | 656190b0a063686b9bd675bbffe43fbebf4aacab (patch) | |
tree | 3f0336fb2080b938fc447ed4c155769be0211fb2 /src/io.c | |
parent | ade8d0b4e9c206ab67dc8ef2006e8070011aae83 (diff) | |
download | apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.gz apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.bz2 apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.tar.xz apk-tools-656190b0a063686b9bd675bbffe43fbebf4aacab.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |