summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-21 11:37:21 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-21 11:37:21 +0300
commit8f7874c1933fc1dff36685d13abfedda56ca9ab7 (patch)
treede372b5d494ad0a7de7357f28bf1316701a3adfe /lib/psm.c
parent2fb15a5443c6a1461a53309d3d4ace598996d8b2 (diff)
downloadrpm-8f7874c1933fc1dff36685d13abfedda56ca9ab7.tar.gz
rpm-8f7874c1933fc1dff36685d13abfedda56ca9ab7.tar.bz2
rpm-8f7874c1933fc1dff36685d13abfedda56ca9ab7.zip
Fix up bunch of silly int vs rpmRC return code mismatches
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/psm.c b/lib/psm.c
index de42c53b4..7dd2a0156 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -687,7 +687,7 @@ static rpmpsm rpmpsmNew(rpmts ts, rpmte te)
return psm;
}
-static int rpmpsmNext(rpmpsm psm, pkgStage nstage)
+static rpmRC rpmpsmNext(rpmpsm psm, pkgStage nstage)
{
psm->nstage = nstage;
return rpmpsmStage(psm, psm->nstage);
@@ -1035,7 +1035,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
}
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
- rc = rpmdbAdd(rpmtsGetRdb(ts), h);
+ rc = (rpmdbAdd(rpmtsGetRdb(ts), h) == 0) ? RPMRC_OK : RPMRC_FAIL;
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
if (rc == RPMRC_OK)
@@ -1045,7 +1045,8 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
case PSM_RPMDB_REMOVE:
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
- rc = rpmdbRemove(rpmtsGetRdb(ts), rpmteDBInstance(psm->te));
+ rc = (rpmdbRemove(rpmtsGetRdb(ts), rpmteDBInstance(psm->te)) == 0) ?
+ RPMRC_OK : RPMRC_FAIL;
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
if (rc == RPMRC_OK)
rpmteSetDBInstance(psm->te, 0);