diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-09-26 09:52:55 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-09-26 09:52:55 +0300 |
commit | 0ddf824afb647b620400dba8172fa4ca7ee1690b (patch) | |
tree | 76a6512f230e1d83be7539d39145ac2d33c5d5ae | |
parent | d16bdb1550c3c3c13a40ad9cb6869564a6abbc38 (diff) | |
download | rpm-0ddf824afb647b620400dba8172fa4ca7ee1690b.tar.gz rpm-0ddf824afb647b620400dba8172fa4ca7ee1690b.tar.bz2 rpm-0ddf824afb647b620400dba8172fa4ca7ee1690b.zip |
Eliminate some unnecessary rpmte-internal accesses in psm
-rw-r--r-- | lib/psm.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -270,7 +270,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, goto exit; } - fi->te->h = headerLink(fi->h); + rpmteSetHeader(fi->te, fi->h); fi->te->fd = fdLink(fd, "installSourcePackage"); hge = fi->hge; hfd = fi->hfd; @@ -386,7 +386,7 @@ exit: if (h != NULL) h = headerFree(h); if (fi != NULL) { - fi->te->h = headerFree(fi->te->h); + rpmteSetHeader(fi->te, NULL); if (fi->te->fd != NULL) (void) Fclose(fi->te->fd); fi->te->fd = NULL; @@ -1377,9 +1377,8 @@ assert(psm->mi == NULL); /* Retrieve installed header. */ rc = rpmpsmNext(psm, PSM_RPMDB_LOAD); -if (rc == RPMRC_OK) -if (psm->te) -psm->te->h = headerLink(fi->h); + if (rc == RPMRC_OK && psm->te) + rpmteSetHeader(psm->te, fi->h); } if (psm->goal == PSM_PKGSAVE) { /* Open output package for writing. */ @@ -1815,9 +1814,8 @@ psm->te->h = headerLink(fi->h); } if (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE) { -if (psm->te != NULL) -if (psm->te->h != NULL) -psm->te->h = headerFree(psm->te->h); + if (psm->te != NULL) + rpmteSetHeader(psm->te, NULL); if (fi->h != NULL) fi->h = headerFree(fi->h); } |