diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-05-30 15:50:29 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-05-30 15:50:29 +0300 |
commit | f67c47b856b0861e47629b13fce58b38afcdcc7a (patch) | |
tree | 0c5fd69ddb4c5a648939f74b9a3293a3a0bb09aa | |
parent | e4203f1a63cc1757c5c3c9d4f63a45f098b29544 (diff) | |
download | librpm-tizen-f67c47b856b0861e47629b13fce58b38afcdcc7a.tar.gz librpm-tizen-f67c47b856b0861e47629b13fce58b38afcdcc7a.tar.bz2 librpm-tizen-f67c47b856b0861e47629b13fce58b38afcdcc7a.zip |
Eliminate bunch of dead assignments on ts vsflags
- The common pattern here is grabbing current flags to a local
variable, modifying them for an operation and then restoring,
which is fine... but we dont care about the previous flags
when we're restoring them.
-rw-r--r-- | lib/query.c | 2 | ||||
-rw-r--r-- | lib/rpminstall.c | 2 | ||||
-rw-r--r-- | lib/verify.c | 2 | ||||
-rw-r--r-- | rpmbuild.c | 2 | ||||
-rw-r--r-- | rpmdb.c | 2 | ||||
-rw-r--r-- | tools/rpmgraph.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/lib/query.c b/lib/query.c index 7df233aa4..ce9a6b16d 100644 --- a/lib/query.c +++ b/lib/query.c @@ -564,7 +564,7 @@ int rpmcliQuery(rpmts ts, QVA_t qva, char * const * argv) ovsflags = rpmtsSetVSFlags(ts, vsflags); ec = rpmcliArgIter(ts, qva, argv); - vsflags = rpmtsSetVSFlags(ts, ovsflags); + rpmtsSetVSFlags(ts, ovsflags); if (qva->qva_showPackage == showQueryPackage) qva->qva_showPackage = NULL; diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 2cacacf33..02a80aee5 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -703,7 +703,7 @@ int rpmInstallSource(rpmts ts, const char * arg, rpmtsSetVSFlags(ts, (specFilePtr) ? (rpmtsVSFlags(ts) | RPMVSF_NEEDPAYLOAD) : rpmtsVSFlags(ts)); rpmRC rpmrc = rpmInstallSourcePackage(ts, fd, specFilePtr, cookie); rc = (rpmrc == RPMRC_OK ? 0 : 1); - ovsflags = rpmtsSetVSFlags(ts, ovsflags); + rpmtsSetVSFlags(ts, ovsflags); } if (rc != 0) { rpmlog(RPMLOG_ERR, _("%s cannot be installed\n"), arg); diff --git a/lib/verify.c b/lib/verify.c index 30fddfef1..48f749c56 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -483,7 +483,7 @@ int rpmcliVerify(rpmts ts, QVA_t qva, char * const * argv) rpmtsSetScriptFd(ts, scriptFd); ovsflags = rpmtsSetVSFlags(ts, vsflags); ec = rpmcliArgIter(ts, qva, argv); - vsflags = rpmtsSetVSFlags(ts, ovsflags); + rpmtsSetVSFlags(ts, ovsflags); rpmtsSetScriptFd(ts, NULL); if (qva->qva_showPackage == showVerifyPackage) diff --git a/rpmbuild.c b/rpmbuild.c index 6aac0279f..c51aa36e1 100644 --- a/rpmbuild.c +++ b/rpmbuild.c @@ -511,7 +511,7 @@ static int build(rpmts ts, const char * arg, BTA_t ba, const char * rcfile) } exit: - vsflags = rpmtsSetVSFlags(ts, ovsflags); + rpmtsSetVSFlags(ts, ovsflags); /* Restore original configuration. */ rpmFreeMacros(NULL); rpmFreeRpmrc(); @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) { rpmVSFlags vsflags = rpmExpandNumeric("%{_vsflags_rebuilddb}"); rpmVSFlags ovsflags = rpmtsSetVSFlags(ts, vsflags); ec = rpmtsRebuildDB(ts); - vsflags = rpmtsSetVSFlags(ts, ovsflags); + rpmtsSetVSFlags(ts, ovsflags); } break; case MODE_VERIFYDB: ec = rpmtsVerifyDB(ts); diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index 082a9cd99..790280595 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -102,7 +102,7 @@ restart: /* Read the header, verifying signatures (if present). */ ovsflags = rpmtsSetVSFlags(ts, vsflags); rpmrc = rpmReadPackageFile(ts, fd, *fnp, &h); - ovsflags = rpmtsSetVSFlags(ts, ovsflags); + rpmtsSetVSFlags(ts, ovsflags); Fclose(fd); fd = NULL; |