Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-10 09:31:14 -0500
committerAllan McRae <allan@archlinux.org>2011-09-11 13:45:54 +1000
commitf7653e582bc499b0c2d16968220c63615ddb9a56 (patch)
treeaad9e4b6bae7ae1bd91d99437a4ef0c7cdd31227 /src
parentdb70c9da153c4767bfd96a15d40e086184bd5402 (diff)
Move download callback static vars into function
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 6fa45f5f..6991430b 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -37,11 +37,8 @@
#include "conf.h"
/* download progress bar */
-static double rate_last;
-static off_t xfered_last;
static off_t list_xfered = 0.0;
static off_t list_total = 0.0;
-static struct timeval initial_time;
/* delayed output during progress bar */
static int on_progress = 0;
@@ -501,6 +498,9 @@ void cb_dl_total(off_t total)
/* callback to handle display of download progress */
void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
{
+ static double rate_last;
+ static off_t xfered_last;
+ static struct timeval initial_time;
int infolen;
int filenamelen;
char *fname, *p;