diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-03-29 15:03:14 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-03-29 15:03:14 +0300 |
commit | 593902eee642912245ed669e265c07dbd51ccb45 (patch) | |
tree | 6407d104672cc882c7618bd693781504e0175bb1 /lib/rpmte.c | |
parent | e18d9e68260aacde0d1fe1f0fdddb008357262fe (diff) | |
download | librpm-tizen-593902eee642912245ed669e265c07dbd51ccb45.tar.gz librpm-tizen-593902eee642912245ed669e265c07dbd51ccb45.tar.bz2 librpm-tizen-593902eee642912245ed669e265c07dbd51ccb45.zip |
Remove unused dependency set file reference count
- this has never been used for anything at all, there are better things
to use our memory for than unused arrays
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r-- | lib/rpmte.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c index 6a54347fb..afdf85610 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -509,10 +509,8 @@ static void rpmteColorDS(rpmte te, rpmTag tag) char mydt; const uint32_t * ddict; rpm_color_t * colors; - int32_t * refs; rpm_color_t val; int Count; - size_t nb; unsigned ix; int ndx, i; @@ -532,10 +530,8 @@ static void rpmteColorDS(rpmte te, rpmTag tag) } colors = xcalloc(Count, sizeof(*colors)); - nb = Count * sizeof(*refs); - refs = memset(xmalloc(nb), -1, nb); - /* Calculate dependency color and reference count. */ + /* Calculate dependency color. */ fi = rpmfiInit(fi, 0); if (fi != NULL) while (rpmfiNext(fi) >= 0) { @@ -551,23 +547,17 @@ static void rpmteColorDS(rpmte te, rpmTag tag) ix &= 0x00ffffff; assert (ix < Count); colors[ix] |= val; - refs[ix]++; } } - /* Set color/refs values in dependency set. */ + /* Set color values in dependency set. */ ds = rpmdsInit(ds); while ((i = rpmdsNext(ds)) >= 0) { val = colors[i]; te->color |= val; (void) rpmdsSetColor(ds, val); - val = refs[i]; - if (val >= 0) - val++; - (void) rpmdsSetRefs(ds, val); } free(colors); - free(refs); } static Header rpmteDBHeader(rpmts ts, unsigned int rec) |