summaryrefslogtreecommitdiff
path: root/lib/order.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-12-18 12:12:44 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-12-21 09:17:32 +0200
commita6b21c7bec3e6b44198ff779b13224155c8d0f20 (patch)
tree440f92fd982c9546e1af383644337e1f7be938b2 /lib/order.c
parent95c14c7a8aa742ffcca47ab47f99e7b4878eb306 (diff)
downloadlibrpm-tizen-a6b21c7bec3e6b44198ff779b13224155c8d0f20.tar.gz
librpm-tizen-a6b21c7bec3e6b44198ff779b13224155c8d0f20.tar.bz2
librpm-tizen-a6b21c7bec3e6b44198ff779b13224155c8d0f20.zip
Convert addRelation() to manipulate the tsort data from tsortInfo directly
Diffstat (limited to 'lib/order.c')
-rw-r--r--lib/order.c8
1 files changed, 4 insertions, 4 deletions
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;