summaryrefslogtreecommitdiff
path: root/lib/rpmts.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-12-04 11:25:46 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-12-04 11:25:46 +0200
commitdbdbe8010cd944f026a5a4e5d071eb31d29d81c4 (patch)
treeb7b0f4014409f8514a1729b48a8776660747d149 /lib/rpmts.c
parent422fa0dbeab879d3510c879554c33e359e0ab7ab (diff)
downloadlibrpm-tizen-dbdbe8010cd944f026a5a4e5d071eb31d29d81c4.tar.gz
librpm-tizen-dbdbe8010cd944f026a5a4e5d071eb31d29d81c4.tar.bz2
librpm-tizen-dbdbe8010cd944f026a5a4e5d071eb31d29d81c4.zip
Eliminate debug junk from the API
- add some helper macros to accomplish the same, easy to enable / disable as needed
Diffstat (limited to 'lib/rpmts.c')
-rw-r--r--lib/rpmts.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/rpmts.c b/lib/rpmts.c
index 19e4df9ca..db1c821e1 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -48,19 +48,19 @@ int _rpmts_debug = 0;
int _rpmts_stats = 0;
-rpmts XrpmtsUnlink(rpmts ts, const char * msg, const char * fn, unsigned ln)
+rpmts rpmtsUnlink(rpmts ts, const char * msg)
{
if (_rpmts_debug)
-fprintf(stderr, "--> ts %p -- %d %s at %s:%u\n", ts, ts->nrefs, msg, fn, ln);
+fprintf(stderr, "--> ts %p -- %d %s\n", ts, ts->nrefs, msg);
ts->nrefs--;
return NULL;
}
-rpmts XrpmtsLink(rpmts ts, const char * msg, const char * fn, unsigned ln)
+rpmts rpmtsLink(rpmts ts, const char * msg)
{
ts->nrefs++;
if (_rpmts_debug)
-fprintf(stderr, "--> ts %p ++ %d %s at %s:%u\n", ts, ts->nrefs, msg, fn, ln);
+fprintf(stderr, "--> ts %p ++ %d %s\n", ts, ts->nrefs, msg);
return ts;
}
@@ -798,7 +798,7 @@ rpmps rpmtsProblems(rpmts ts)
rpmps ps = NULL;
if (ts) {
if (ts->probs)
- ps = rpmpsLink(ts->probs, NULL);
+ ps = rpmpsLink(ts->probs, RPMDBG_M("rpmtsProblems"));
}
return ps;
}
@@ -908,7 +908,7 @@ rpmts rpmtsFree(rpmts ts)
return NULL;
if (ts->nrefs > 1)
- return rpmtsUnlink(ts, "tsCreate");
+ return rpmtsUnlink(ts, RPMDBG_M("tsCreate"));
rpmtsEmpty(ts);
@@ -924,7 +924,7 @@ rpmts rpmtsFree(rpmts ts)
ts->dsi = _free(ts->dsi);
if (ts->scriptFd != NULL) {
- ts->scriptFd = fdFree(ts->scriptFd, "rpmtsFree");
+ ts->scriptFd = fdFree(ts->scriptFd, RPMDBG_M("rpmtsFree"));
ts->scriptFd = NULL;
}
ts->rootDir = _free(ts->rootDir);
@@ -944,7 +944,7 @@ rpmts rpmtsFree(rpmts ts)
/* Free up the memory used by the rpmtsScore */
ts->score = rpmtsScoreFree(ts->score);
- (void) rpmtsUnlink(ts, "tsCreate");
+ (void) rpmtsUnlink(ts, RPMDBG_M("tsCreate"));
ts = _free(ts);
@@ -1092,11 +1092,13 @@ void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd)
if (ts != NULL) {
if (ts->scriptFd != NULL) {
- ts->scriptFd = fdFree(ts->scriptFd, "rpmtsSetScriptFd");
+ ts->scriptFd = fdFree(ts->scriptFd,
+ RPMDBG_M("rpmtsSetScriptFd"));
ts->scriptFd = NULL;
}
if (scriptFd != NULL)
- ts->scriptFd = fdLink((void *)scriptFd, "rpmtsSetScriptFd");
+ ts->scriptFd = fdLink((void *)scriptFd,
+ RPMDBG_M("rpmtsSetScriptFd"));
}
}
@@ -1596,7 +1598,7 @@ rpmts rpmtsCreate(void)
ts->nrefs = 0;
- return rpmtsLink(ts, "tsCreate");
+ return rpmtsLink(ts, RPMDBG_M("tsCreate"));
}
/**********************