Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=4df10522651e65f624342d5a600d3675f1ded097
commit 4df10522651e65f624342d5a600d3675f1ded097 Author: Michel Hermier <[email protected]> Date: Thu May 15 08:37:33 2014 +0200 libpacman: Make _pacman_remove_commit called only in one place. diff --git a/lib/libpacman/trans.cpp b/lib/libpacman/trans.cpp index 4f6b8d1..0c74c33 100644 --- a/lib/libpacman/trans.cpp +++ b/lib/libpacman/trans.cpp @@ -58,9 +58,6 @@ using namespace libpacman; -static -int _pacman_remove_commit(pmtrans_t *trans, pmlist_t **data); - static int check_oldcache(void) { Database *db = handle->db_local; @@ -1879,6 +1876,11 @@ struct trans_event_table_item { int __pmtrans_t::commit(pmlist_t **data) { + return commit(type, data); +} + +int __pmtrans_t::commit(pmtranstype_t type, pmlist_t **data) +{ Database *db_local; ASSERT((db_local = handle->db_local) != NULL, RET_ERR(PM_ERR_DB_NULL, -1)); @@ -1968,7 +1970,7 @@ int __pmtrans_t::commit(pmlist_t **data) } /* copy the skiplist over */ tr->skiplist = _pacman_list_strdup(skiplist); - if(_pacman_remove_commit(tr, NULL) == -1) { + if(tr->commit(PM_TRANS_TYPE_REMOVE, NULL) == -1) { delete tr; RET_ERR(PM_ERR_TRANS_ABORT, -1); } diff --git a/lib/libpacman/trans.h b/lib/libpacman/trans.h index 8f592eb..f9c0235 100644 --- a/lib/libpacman/trans.h +++ b/lib/libpacman/trans.h @@ -80,6 +80,9 @@ struct __pmtrans_t FStringList *skiplist; FStringList *triggers; pmtrans_cbs_t cbs; + +private: + int commit(pmtranstype_t type, pmlist_t **data); }; #define EVENT(t, e, d1, d2) \ _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
