summaryrefslogtreecommitdiff
path: root/atari
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-05-19 17:12:18 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-05-19 17:12:18 +0100
commitaf11d7eb9683e7daab8b56a3c0ee8063469ff931 (patch)
tree0c6495f221ea8cabe93f6366aa4fda823b6e14a2 /atari
parentc59c314283b34758078a84d81d980bb9537b7732 (diff)
downloadnetsurf-af11d7eb9683e7daab8b56a3c0ee8063469ff931.tar.gz
netsurf-af11d7eb9683e7daab8b56a3c0ee8063469ff931.tar.bz2
Scope reduce some variables.
Diffstat (limited to 'atari')
-rwxr-xr-xatari/download.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/atari/download.c b/atari/download.c
index 5f034d857..6fe0d87e0 100755
--- a/atari/download.c
+++ b/atari/download.c
@@ -362,8 +362,6 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
uint32_t clck = clock();
uint32_t tnow = clck / (CLOCKS_PER_SEC>>3);
uint32_t sdiff = (clck / (CLOCKS_PER_SEC)) - dw->start;
- uint32_t p = 0;
- float speed;
float pf = 0;
LOG((""));
@@ -384,11 +382,13 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
/* Update GUI */
if ((tnow - dw->lastrdw) > 1) {
+ float speed;
dw->lastrdw = tnow;
speed = dw->size_downloaded / sdiff;
if( dw->size_total > 0 ){
+ uint32_t p = 0;
p = ((double)dw->size_downloaded / (double)dw->size_total * 100);
snprintf( (char*)&dw->lbl_percent, MAX_SLEN_LBL_PERCENT,
"%lu%s", p, "%"