summaryrefslogtreecommitdiff
path: root/lib/rpmgi.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-19 16:51:32 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-03-19 16:51:32 +0200
commitf510c8704cbd08719e5f868976cfd4242b6fca13 (patch)
tree764ba34002a402bf9733084ea38a5bd442033f89 /lib/rpmgi.c
parent6b1ce53ae108d6581861237864d74747099d5cb1 (diff)
downloadrpm-f510c8704cbd08719e5f868976cfd4242b6fca13.tar.gz
rpm-f510c8704cbd08719e5f868976cfd4242b6fca13.tar.bz2
rpm-f510c8704cbd08719e5f868976cfd4242b6fca13.zip
Lose useless rpmgi reference counting
- these dont get passed around in a manner where refcounting would make any difference
Diffstat (limited to 'lib/rpmgi.c')
-rw-r--r--lib/rpmgi.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/rpmgi.c b/lib/rpmgi.c
index fdcbdecc2..1b614bf79 100644
--- a/lib/rpmgi.c
+++ b/lib/rpmgi.c
@@ -51,8 +51,6 @@ struct rpmgi_s {
int ftsOpts;
FTS * ftsp;
FTSENT * fts;
-
- int nrefs; /*!< Reference count. */
};
static const char * const ftsInfoStrings[] = {
@@ -362,39 +360,11 @@ fprintf(stderr, "\tav %p[%ld]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (long) (av -
return rpmrc;
}
-rpmgi rpmgiUnlink(rpmgi gi, const char * msg)
-{
- if (gi == NULL) return NULL;
-
-if (_rpmgi_debug && msg != NULL)
-fprintf(stderr, "--> gi %p -- %d: %s\n", gi, gi->nrefs, msg);
-
- gi->nrefs--;
- return NULL;
-}
-
-rpmgi rpmgiLink(rpmgi gi, const char * msg)
-{
- if (gi == NULL) return NULL;
- gi->nrefs++;
-
-if (_rpmgi_debug && msg != NULL)
-fprintf(stderr, "--> gi %p ++ %d: %s\n", gi, gi->nrefs, msg);
-
- return gi;
-}
-
rpmgi rpmgiFree(rpmgi gi)
{
if (gi == NULL)
return NULL;
- if (gi->nrefs > 1)
- return rpmgiUnlink(gi, __FUNCTION__);
-
- (void) rpmgiUnlink(gi, __FUNCTION__);
-
-
gi->hdrPath = _free(gi->hdrPath);
gi->h = headerFree(gi->h);
@@ -447,8 +417,6 @@ rpmgi rpmgiNew(rpmts ts, rpmTag tag, const void * keyp, size_t keylen)
gi->ftsp = NULL;
gi->fts = NULL;
- gi = rpmgiLink(gi, __FUNCTION__);
-
return gi;
}