projects
/
oweals
/
opkg-lede.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
opkg: protect against total being zero when calculation percentage
[oweals/opkg-lede.git]
/
opkg_download.c
diff --git
a/opkg_download.c
b/opkg_download.c
index 161a5100363e917f8c92e3b0ec168ec29b106096..c3fa44cc209a38adc9c0a12ff8da812c636eb235 100644
(file)
--- a/
opkg_download.c
+++ b/
opkg_download.c
@@
-42,7
+42,7
@@
curl_progress_func (char* url,
double ulnow)
{
int i;
- int p =
d*100/t
;
+ int p =
(t) ? d*100/t : 0
;
#ifdef OPKG_LIB
if (opkg_cb_download_progress)