summaryrefslogtreecommitdiff
path: root/src/tool_cb_prg.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-10-13 19:39:41 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-10-15 20:42:05 +0200
commitd774802eec7f8f10a0936a85047f8ef9daed70f2 (patch)
tree0f47323517c0bb334b407b552d4490ebc7da9e63 /src/tool_cb_prg.c
parent69c0d3fbc8bfb04d59b65ca4e393e3a5161097f4 (diff)
downloadcurl-d774802eec7f8f10a0936a85047f8ef9daed70f2.tar.gz
tool: use XFERFUNCTION to save some casts
Diffstat (limited to 'src/tool_cb_prg.c')
-rw-r--r--src/tool_cb_prg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index b049377ea..00078d0de 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -32,14 +32,14 @@
#include "memdebug.h" /* keep this as LAST include */
/*
-** callback for CURLOPT_PROGRESSFUNCTION
+** callback for CURLOPT_XFERINFOFUNCTION
*/
#define MAX_BARLENGTH 256
int tool_progress_cb(void *clientp,
- double dltotal, double dlnow,
- double ultotal, double ulnow)
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
{
/* The original progress-bar source code was written for curl by Lars Aas,
and this new edition inherits some of his concepts. */
@@ -60,10 +60,10 @@ int tool_progress_cb(void *clientp,
return 0;
/* expected transfer size */
- total = (curl_off_t)dltotal + (curl_off_t)ultotal + bar->initial_size;
+ total = dltotal + ultotal + bar->initial_size;
/* we've come this far */
- point = (curl_off_t)dlnow + (curl_off_t)ulnow + bar->initial_size;
+ point = dlnow + ulnow + bar->initial_size;
if(point > total)
/* we have got more than the expected total! */