Eliminate unnecessary rpmtsiOc()
- it used to be called from ordering code but now there's precisely one caller which used it as a fancy way to do increment an integer... rip
This commit is contained in:
parent
24780b810e
commit
80853dbe99
|
@ -684,11 +684,6 @@ assert (ix < Count);
|
|||
free(refs);
|
||||
}
|
||||
|
||||
int rpmtsiOc(rpmtsi tsi)
|
||||
{
|
||||
return tsi->ocsave;
|
||||
}
|
||||
|
||||
rpmtsi rpmtsiFree(rpmtsi tsi)
|
||||
{
|
||||
/* XXX watchout: a funky recursion segfaults here iff nrefs is wrong. */
|
||||
|
@ -704,7 +699,6 @@ rpmtsi rpmtsiInit(rpmts ts)
|
|||
tsi = xcalloc(1, sizeof(*tsi));
|
||||
tsi->ts = rpmtsLink(ts, RPMDBG_M("rpmtsi"));
|
||||
tsi->oc = 0;
|
||||
tsi->ocsave = tsi->oc;
|
||||
return tsi;
|
||||
}
|
||||
|
||||
|
@ -723,7 +717,6 @@ rpmte rpmtsiNextElement(rpmtsi tsi)
|
|||
return te;
|
||||
|
||||
if (tsi->oc < rpmtsNElements(tsi->ts)) oc = tsi->oc++;
|
||||
tsi->ocsave = oc;
|
||||
if (oc != -1)
|
||||
te = rpmtsElement(tsi->ts, oc);
|
||||
return te;
|
||||
|
|
|
@ -358,13 +358,6 @@ rpmfi rpmteFI(rpmte te);
|
|||
*/
|
||||
void rpmteColorDS(rpmte te, rpmTag tag);
|
||||
|
||||
/** \ingroup rpmte
|
||||
* Return transaction element index.
|
||||
* @param tsi transaction element iterator
|
||||
* @return transaction element index
|
||||
*/
|
||||
int rpmtsiOc(rpmtsi tsi);
|
||||
|
||||
/** \ingroup rpmte
|
||||
* Destroy transaction element iterator.
|
||||
* @param tsi transaction element iterator
|
||||
|
|
|
@ -63,7 +63,6 @@ struct rpmfs_s {
|
|||
*/
|
||||
struct rpmtsi_s {
|
||||
rpmts ts; /*!< transaction set. */
|
||||
int ocsave; /*!< last returned iterator index. */
|
||||
int oc; /*!< iterator index. */
|
||||
};
|
||||
|
||||
|
|
|
@ -847,6 +847,7 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(rpmts ts, uint64_t fileCount)
|
|||
rpmfi fi;
|
||||
rpmdbMatchIterator mi;
|
||||
int xx;
|
||||
int oc = 0;
|
||||
const char * baseName;
|
||||
|
||||
rpmStringSet baseNames = rpmStringSetCreate(fileCount,
|
||||
|
@ -858,13 +859,10 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(rpmts ts, uint64_t fileCount)
|
|||
while ((p = rpmtsiNext(pi, 0)) != NULL) {
|
||||
(void) rpmdbCheckSignals();
|
||||
|
||||
if ((fi = rpmteFI(p)) == NULL)
|
||||
continue; /* XXX can't happen */
|
||||
rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_PROGRESS, rpmtsiOc(pi),
|
||||
ts->orderCount);
|
||||
rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_PROGRESS, oc++, ts->orderCount);
|
||||
|
||||
/* Gather all installed headers with matching basename's. */
|
||||
fi = rpmfiInit(fi, 0);
|
||||
fi = rpmfiInit(rpmteFI(p), 0);
|
||||
while (rpmfiNext(fi) >= 0) {
|
||||
size_t keylen;
|
||||
baseName = rpmfiBN(fi);
|
||||
|
|
Loading…
Reference in New Issue