diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-21 11:37:21 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-21 11:37:21 +0300 |
commit | 8f7874c1933fc1dff36685d13abfedda56ca9ab7 (patch) | |
tree | de372b5d494ad0a7de7357f28bf1316701a3adfe /lib/psm.c | |
parent | 2fb15a5443c6a1461a53309d3d4ace598996d8b2 (diff) | |
download | librpm-tizen-8f7874c1933fc1dff36685d13abfedda56ca9ab7.tar.gz librpm-tizen-8f7874c1933fc1dff36685d13abfedda56ca9ab7.tar.bz2 librpm-tizen-8f7874c1933fc1dff36685d13abfedda56ca9ab7.zip |
Fix up bunch of silly int vs rpmRC return code mismatches
Diffstat (limited to 'lib/psm.c')
-rw-r--r-- | lib/psm.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |