From f5dd51792e65ae46e09ddd3fc6555487ad191f34 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 18 Mar 2024 12:14:31 +0200 Subject: [PATCH] Fix int/enum mismatches from rpmChrootIn() returns in psm No functional changes in here either. --- lib/psm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/psm.c b/lib/psm.c index b9341de56..6acad368d 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -862,7 +862,8 @@ static rpmRC rpmPackageInstall(rpmts ts, rpmpsm psm) if (rc) break; } - if ((rc = rpmChrootIn()) == 0) { + rc = rpmChrootIn() ? RPMRC_FAIL : RPMRC_OK; + if (rc == RPMRC_OK) { rc = rpmpsmUnpack(psm); rpmChrootOut(); } @@ -974,7 +975,8 @@ static rpmRC rpmPackageErase(rpmts ts, rpmpsm psm) if (rc) break; } - if ((rc = rpmChrootIn()) == 0) { + rc = rpmChrootIn() ? RPMRC_FAIL : RPMRC_OK; + if (rc == RPMRC_OK) { rc = rpmpsmRemove(psm); rpmChrootOut(); } @@ -1021,7 +1023,8 @@ static rpmRC rpmPackageRestore(rpmts ts, rpmpsm psm) rpmRC rc = RPMRC_OK; rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_INSTALL), 0); - if ((rc = rpmChrootIn()) == 0) { + rc = rpmChrootIn() ? RPMRC_FAIL : RPMRC_OK; + if (rc == RPMRC_OK) { char *failedFile = NULL; rpmpsmNotify(psm, RPMCALLBACK_INST_START, 0); /* make sure first progress call gets made */