diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-07 17:10:12 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-07 17:10:12 +0300 |
commit | 0232226ab1a5be31a0fdb5e0cdeb65e2430404df (patch) | |
tree | 2e354975c0c9080d00f92c5397a23f7d6c481c9c /build | |
parent | ec65f5e5f0a56b398878f5087685b71942db362a (diff) | |
download | librpm-tizen-0232226ab1a5be31a0fdb5e0cdeb65e2430404df.tar.gz librpm-tizen-0232226ab1a5be31a0fdb5e0cdeb65e2430404df.tar.bz2 librpm-tizen-0232226ab1a5be31a0fdb5e0cdeb65e2430404df.zip |
Minor rpmfcGenerateDependsHelper() cleanups
- initialize at declaration time, remove unnecessary variables etc
Diffstat (limited to 'build')
-rw-r--r-- | build/rpmfc.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c index c47b160be..308d7da94 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -1466,14 +1466,9 @@ static int rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi) appendLineStringBuf(sb_stdin, rpmfiFN(fi)); for (dm = DepMsgs; dm->msg != NULL; dm++) { - rpmTag tag; + rpmTag tag = (dm->ftag > 0) ? dm->ftag : dm->ntag; rpmsenseFlags tagflags; - char * s; - int xx; - - tag = (dm->ftag > 0) ? dm->ftag : dm->ntag; - tagflags = 0; - s = NULL; + char * s = NULL; switch(tag) { case RPMTAG_PROVIDEFLAGS: @@ -1493,14 +1488,12 @@ static int rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi) break; } - xx = rpmfcExec(dm->argv, sb_stdin, &sb_stdout, failnonzero); - if (xx == -1) + if (rpmfcExec(dm->argv, sb_stdin, &sb_stdout, failnonzero) == -1) continue; s = rpmExpand(dm->argv[0], NULL); - rpmlog(RPMLOG_NOTICE, _("Finding %s: %s\n"), dm->msg, - (s ? s : "")); - s = _free(s); + rpmlog(RPMLOG_NOTICE, _("Finding %s: %s\n"), dm->msg, (s ? s : "")); + free(s); if (sb_stdout == NULL) { rc = RPMRC_FAIL; |