summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-05-03 10:36:00 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-05-03 10:36:00 +0300
commit87ea239ffc5763b1d85ce1b0d35759d9bafe1cb5 (patch)
treef352a043548eba2465922323ba93cf4c36976d29 /lib
parent5f607d565d583b26347d3560e15ab3258596220a (diff)
downloadrpm-87ea239ffc5763b1d85ce1b0d35759d9bafe1cb5.tar.gz
rpm-87ea239ffc5763b1d85ce1b0d35759d9bafe1cb5.tar.bz2
rpm-87ea239ffc5763b1d85ce1b0d35759d9bafe1cb5.zip
rpmReSign() doesn't return rpmRC codes, make it more obvious
- cleanup "rc = RPMRC_FAIL" copy-paste leftovers
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmchecksig.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index 1b387641b..817aebb71 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -135,7 +135,7 @@ static int getSignid(Header sig, rpmSigTag sigtag, pgpKeyID_t signid)
* @param ts transaction set
* @param qva mode flags and parameters
* @param argv array of package file names (NULL terminated)
- * @return 0 on success
+ * @return 0 on success, -1 on error
*/
static int rpmReSign(rpmts ts, QVA_t qva, ARGV_const_t argv)
{
@@ -150,14 +150,14 @@ static int rpmReSign(rpmts ts, QVA_t qva, ARGV_const_t argv)
void * uh = NULL;
rpmTagType uht;
rpm_count_t uhc;
- int res = EXIT_FAILURE;
+ int res = -1; /* assume failure */
int deleting = (qva->qva_mode == RPMSIGN_DEL_SIGNATURE);
- rpmRC rc;
int xx;
if (argv)
while ((rpm = *argv++) != NULL)
{
+ rpmRC rc;
fprintf(stdout, "%s:\n", rpm);
@@ -200,7 +200,6 @@ static int rpmReSign(rpmts ts, QVA_t qva, ARGV_const_t argv)
ofd = rpmMkTemp(NULL, &sigtarget);
if (ofd == NULL || Ferror(ofd)) {
rpmlog(RPMLOG_ERR, _("rpmMkTemp failed\n"));
- rc = RPMRC_FAIL;
goto exit;
}
/* Write the header and archive to a temp file */
@@ -329,7 +328,6 @@ static int rpmReSign(rpmts ts, QVA_t qva, ARGV_const_t argv)
ofd = rpmMkTemp(NULL, &trpm);
if (ofd == NULL || Ferror(ofd)) {
rpmlog(RPMLOG_ERR, _("rpmMkTemp failed\n"));
- rc = RPMRC_FAIL;
goto exit;
}