From ed8b3fb2c54aab97b616e83a24a3f65a36f9c0f2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 13 Nov 2008 09:56:52 +0200 Subject: [PATCH] Move ts and preferred color fetching out of the loop - neither ts or preferred color changes per-file --- lib/transaction.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/transaction.c b/lib/transaction.c index c4b592e58..635acb01b 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -223,20 +223,19 @@ static int handleRmvdInstalledFiles(const rpmts ts, rpmfi fi, * Update disk space needs on each partition for this package's files. */ /* XXX only ts->{probs,di} modified */ -static void handleOverlappedFiles(const rpmts ts, - const rpmte p, rpmfi fi) +static void handleOverlappedFiles(const rpmts ts, const rpmte p, rpmfi fi) { rpm_loff_t fixupSize = 0; rpmps ps; const char * fn; int i, j; + rpm_color_t tscolor = rpmtsColor(ts); + rpm_color_t prefcolor = rpmtsPrefColor(ts); ps = rpmtsProblems(ts); fi = rpmfiInit(fi, 0); if (fi != NULL) while ((i = rpmfiNext(fi)) >= 0) { - rpm_color_t tscolor = rpmtsColor(ts); - rpm_color_t prefcolor = rpmtsPrefColor(ts); rpm_color_t oFColor, FColor; struct fingerPrint_s * fiFps; int otherPkgNum, otherFileNum;