From a6b21c7bec3e6b44198ff779b13224155c8d0f20 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 18 Dec 2009 12:12:44 +0200 Subject: Convert addRelation() to manipulate the tsort data from tsortInfo directly --- lib/order.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/order.c') diff --git a/lib/order.c b/lib/order.c index c1d7faf7d..d13211ccd 100644 --- a/lib/order.c +++ b/lib/order.c @@ -174,10 +174,10 @@ static inline int addRelation(rpmts ts, } /* Save max. depth in dependency tree */ - if (rpmteDepth(p) <= rpmteDepth(q)) - (void) rpmteSetDepth(p, (rpmteDepth(q) + 1)); - if (rpmteDepth(p) > ts->maxDepth) - ts->maxDepth = rpmteDepth(p); + if (tsi_p->depth <= tsi_q->depth) + tsi_p->depth = tsi_q->depth + 1; + if (tsi_p->depth > ts->maxDepth) + ts->maxDepth = tsi_p->depth; rel = xcalloc(1, sizeof(*rel)); rel->rel_suc = p; -- cgit v1.2.3