Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=88b67e68f7e1faea24bf82fcefd3a44f43ab4ac5

commit 88b67e68f7e1faea24bf82fcefd3a44f43ab4ac5
Author: Michel Hermier <herm...@frugalware.org>
Date:   Sun Jun 8 11:23:03 2014 +0200

libpacman: Remove one global handle usage.

diff --git a/lib/libpacman/trans.cpp b/lib/libpacman/trans.cpp
index 30ec51f..f8e3e30 100644
--- a/lib/libpacman/trans.cpp
+++ b/lib/libpacman/trans.cpp
@@ -59,9 +59,9 @@
using namespace flib;
using namespace libpacman;

-static int check_oldcache(void)
+static
+int check_oldcache(Database *db)
{
-       Database *db = handle->db_local;
time_t timestamp;

if(db->gettimestamp(&timestamp) == -1) {
@@ -101,7 +101,7 @@ __pmtrans_t::__pmtrans_t(Handle *handle, pmtranstype_t 
type, unsigned int flags)

state = STATE_INITIALIZED;

-       check_oldcache();
+       check_oldcache(handle->db_local);
}

__pmtrans_t::~__pmtrans_t()
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to