diff options
-rw-r--r-- | lib/fsm.c | 2 | ||||
-rw-r--r-- | lib/poptALL.c | 4 | ||||
-rw-r--r-- | lib/psm.c | 2 | ||||
-rw-r--r-- | lib/rpmgi.c | 2 | ||||
-rw-r--r-- | lib/rpmts.c | 24 | ||||
-rw-r--r-- | lib/rpmts.h | 8 |
6 files changed, 15 insertions, 27 deletions
@@ -159,7 +159,7 @@ mapInitIterator(rpmts ts, rpmte te, rpmfi fi) FSMI_t iter = NULL; iter = xcalloc(1, sizeof(*iter)); - iter->ts = rpmtsLink(ts, RPMDBG_M("mapIterator")); + iter->ts = rpmtsLink(ts); iter->te = te; /* XXX rpmte is not refcounted yet */ iter->fi = rpmfiLink(fi, RPMDBG_M("mapIterator")); iter->reverse = (rpmteType(te) == TR_REMOVED); diff --git a/lib/poptALL.c b/lib/poptALL.c index 2c2e3ae76..9983101f8 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -54,8 +54,6 @@ extern int _rpmsq_debug; extern int _rpmte_debug; -extern int _rpmts_debug; - extern int _rpmts_stats; const char * rpmcliPipeOutput = NULL; @@ -248,8 +246,6 @@ struct poptOption rpmcliAllPoptTable[] = { NULL, NULL}, { "rpmtedebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmte_debug, -1, NULL, NULL}, - { "rpmtsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmts_debug, -1, - NULL, NULL}, { "stats", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmts_stats, -1, NULL, NULL}, @@ -669,7 +669,7 @@ static rpmpsm rpmpsmNew(rpmts ts, rpmte te) { rpmpsm psm = xcalloc(1, sizeof(*psm)); - if (ts) psm->ts = rpmtsLink(ts, RPMDBG_M("rpmpsmNew")); + if (ts) psm->ts = rpmtsLink(ts); if (te) { #ifdef NOTYET psm->te = rpmteLink(te, RPMDBG_M("rpmpsmNew")); diff --git a/lib/rpmgi.c b/lib/rpmgi.c index 5a34c8f34..bcc2f6e17 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -196,7 +196,7 @@ rpmgi rpmgiNew(rpmts ts, rpmgiFlags flags, ARGV_const_t argv) { rpmgi gi = xcalloc(1, sizeof(*gi)); - gi->ts = rpmtsLink(ts, __FUNCTION__); + gi->ts = rpmtsLink(ts); gi->flags = flags; gi->i = -1; diff --git a/lib/rpmts.c b/lib/rpmts.c index 4b7d03014..ea4edb1f8 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -37,23 +37,19 @@ struct rpmtsi_s { static void loadKeyring(rpmts ts); -int _rpmts_debug = 0; - int _rpmts_stats = 0; -rpmts rpmtsUnlink(rpmts ts, const char * msg) +rpmts rpmtsUnlink(rpmts ts) { -if (_rpmts_debug) -fprintf(stderr, "--> ts %p -- %d %s\n", ts, ts->nrefs, msg); - ts->nrefs--; + if (ts) + ts->nrefs--; return NULL; } -rpmts rpmtsLink(rpmts ts, const char * msg) +rpmts rpmtsLink(rpmts ts) { - ts->nrefs++; -if (_rpmts_debug) -fprintf(stderr, "--> ts %p ++ %d %s\n", ts, ts->nrefs, msg); + if (ts) + ts->nrefs++; return ts; } @@ -575,7 +571,7 @@ rpmts rpmtsFree(rpmts ts) return NULL; if (ts->nrefs > 1) - return rpmtsUnlink(ts, RPMDBG_M("tsCreate")); + return rpmtsUnlink(ts); rpmtsEmpty(ts); @@ -601,7 +597,7 @@ rpmts rpmtsFree(rpmts ts) if (_rpmts_stats) rpmtsPrintStats(ts); - (void) rpmtsUnlink(ts, RPMDBG_M("tsCreate")); + (void) rpmtsUnlink(ts); ts = _free(ts); @@ -933,7 +929,7 @@ rpmts rpmtsCreate(void) ts->nrefs = 0; - return rpmtsLink(ts, RPMDBG_M("tsCreate")); + return rpmtsLink(ts); } rpmtsi rpmtsiFree(rpmtsi tsi) @@ -949,7 +945,7 @@ rpmtsi rpmtsiInit(rpmts ts) rpmtsi tsi = NULL; tsi = xcalloc(1, sizeof(*tsi)); - tsi->ts = rpmtsLink(ts, RPMDBG_M("rpmtsi")); + tsi->ts = rpmtsLink(ts); tsi->oc = 0; return tsi; } diff --git a/lib/rpmts.h b/lib/rpmts.h index 7abc4c5b8..fad4dfa84 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -20,7 +20,6 @@ extern "C" { #endif -extern int _rpmts_debug; extern int _rpmts_stats; /** \ingroup rpmts @@ -198,19 +197,16 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet); /** \ingroup rpmts * Unreference a transaction instance. * @param ts transaction set - * @param msg * @return NULL always */ -rpmts rpmtsUnlink (rpmts ts, - const char * msg); +rpmts rpmtsUnlink (rpmts ts); /** \ingroup rpmts * Reference a transaction set instance. * @param ts transaction set - * @param msg * @return new transaction set reference */ -rpmts rpmtsLink (rpmts ts, const char * msg); +rpmts rpmtsLink (rpmts ts); /** \ingroup rpmts * Close the database used by the transaction. |