Avoid stepping on toes of relatives, part 1
- Eliminate uses of "this" which is a reserved keyword in C++
This commit is contained in:
parent
5d79b79c1b
commit
b9cd5a5e74
|
@ -182,7 +182,7 @@ static int findPos(rpmts ts, rpm_color_t tscolor, Header h, int upgrade)
|
|||
|
||||
/* XXX can't use rpmtsiNext() filter or oc will have wrong value. */
|
||||
for (oc = 0; (p = rpmtsiNext(pi, 0)) != NULL; oc++) {
|
||||
rpmds this, obsoletes;
|
||||
rpmds thisds, obsoletes;
|
||||
|
||||
/* Only added binary packages need checking */
|
||||
if (rpmteType(p) == TR_REMOVED || rpmteIsSource(p))
|
||||
|
@ -199,10 +199,10 @@ static int findPos(rpmts ts, rpm_color_t tscolor, Header h, int upgrade)
|
|||
}
|
||||
|
||||
/* Replace already added obsoleted packages by obsoleting package */
|
||||
this = rpmteDS(p, RPMTAG_NAME);
|
||||
thisds = rpmteDS(p, RPMTAG_NAME);
|
||||
rpmdsInit(obsChk);
|
||||
while (rpmdsNext(obsChk) >= 0) {
|
||||
if (rpmdsCompare(obsChk, this)) {
|
||||
if (rpmdsCompare(obsChk, thisds)) {
|
||||
obsolete = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -225,14 +225,14 @@ static int findPos(rpmts ts, rpm_color_t tscolor, Header h, int upgrade)
|
|||
* Always skip identical NEVR.
|
||||
* On upgrade, if newer NEVR was previously added, skip adding older.
|
||||
*/
|
||||
if (rpmdsCompare(sameChk, this) ||
|
||||
(upgrade && rpmdsCompare(newChk, this))) {
|
||||
if (rpmdsCompare(sameChk, thisds) ||
|
||||
(upgrade && rpmdsCompare(newChk, thisds))) {
|
||||
oc = -1;
|
||||
break;;
|
||||
}
|
||||
|
||||
/* On upgrade, if older NEVR was previously added, replace with new */
|
||||
if (upgrade && rpmdsCompare(oldChk, this) != 0) {
|
||||
if (upgrade && rpmdsCompare(oldChk, thisds) != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ struct rpmte_s {
|
|||
unsigned int db_instance; /*!< Database instance (of removed pkgs) */
|
||||
tsortInfo tsi; /*!< Dependency ordering chains. */
|
||||
|
||||
rpmds this; /*!< This package's provided NEVR. */
|
||||
rpmds thisds; /*!< This package's provided NEVR. */
|
||||
rpmds provides; /*!< Provides: dependencies. */
|
||||
rpmds requires; /*!< Requires: dependencies. */
|
||||
rpmds conflicts; /*!< Conflicts: dependencies. */
|
||||
|
@ -77,7 +77,7 @@ static int rpmteClose(rpmte te, int reset_fi);
|
|||
|
||||
void rpmteCleanDS(rpmte te)
|
||||
{
|
||||
te->this = rpmdsFree(te->this);
|
||||
te->thisds = rpmdsFree(te->thisds);
|
||||
te->provides = rpmdsFree(te->provides);
|
||||
te->requires = rpmdsFree(te->requires);
|
||||
te->conflicts = rpmdsFree(te->conflicts);
|
||||
|
@ -219,7 +219,7 @@ static void addTE(rpmte p, Header h, fnpyKey key, rpmRelocation * relocs)
|
|||
p->pkgFileSize = 0;
|
||||
p->headerSize = headerSizeof(h, HEADER_MAGIC_NO);
|
||||
|
||||
p->this = rpmdsThis(h, RPMTAG_PROVIDENAME, RPMSENSE_EQUAL);
|
||||
p->thisds = rpmdsThis(h, RPMTAG_PROVIDENAME, RPMSENSE_EQUAL);
|
||||
p->provides = rpmdsNew(h, RPMTAG_PROVIDENAME, 0);
|
||||
p->requires = rpmdsNew(h, RPMTAG_REQUIRENAME, 0);
|
||||
p->conflicts = rpmdsNew(h, RPMTAG_CONFLICTNAME, 0);
|
||||
|
@ -519,7 +519,7 @@ rpmds rpmteDS(rpmte te, rpmTag tag)
|
|||
return NULL;
|
||||
|
||||
switch (tag) {
|
||||
case RPMTAG_NAME: return te->this;
|
||||
case RPMTAG_NAME: return te->thisds;
|
||||
case RPMTAG_PROVIDENAME: return te->provides;
|
||||
case RPMTAG_REQUIRENAME: return te->requires;
|
||||
case RPMTAG_CONFLICTNAME: return te->conflicts;
|
||||
|
|
Loading…
Reference in New Issue