diff mbox series

Cast download statistics to `size_t` before division

Message ID 20220221204144.83995-1-joaofl@gmail.com
State Changes Requested
Headers show
Series Cast download statistics to `size_t` before division | expand

Commit Message

João Loureiro Feb. 21, 2022, 8:41 p.m. UTC
---
 corelib/channel_curl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Fabio Estevam Feb. 21, 2022, 8:48 p.m. UTC | #1
Hi João,

On Mon, Feb 21, 2022 at 5:42 PM João Loureiro <joaofl@gmail.com> wrote:
>
> ---

Commit log and your Signed-off-by are missing.
diff mbox series

Patch

diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c
index 3ee801f..3a38a31 100644
--- a/corelib/channel_curl.c
+++ b/corelib/channel_curl.c
@@ -439,7 +439,9 @@  static int channel_callback_xferinfo(void *p, curl_off_t dltotal, curl_off_t dln
 	else
 		data->percent = percent;
 
-	DEBUG("Downloaded %d%% (%lu of %lu kB).", percent, dlnow / 1024, dltotal / 1024);
+	DEBUG("Downloaded %d%% (%zu of %zu kB).", percent,
+		(size_t)dlnow / 1024,
+		(size_t)dltotal / 1024);
 	swupdate_download_update(percent, dltotal);
 
 	return 0;