diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-12-18 12:16:25 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-12-21 09:17:59 +0200 |
commit | 6e28e8fdba7260b3a9dd2824ac2b44d1b658c876 (patch) | |
tree | ac900e4ef6c34310b80702dc814d940f9370a538 /lib | |
parent | a6b21c7bec3e6b44198ff779b13224155c8d0f20 (diff) | |
download | librpm-tizen-6e28e8fdba7260b3a9dd2824ac2b44d1b658c876.tar.gz librpm-tizen-6e28e8fdba7260b3a9dd2824ac2b44d1b658c876.tar.bz2 librpm-tizen-6e28e8fdba7260b3a9dd2824ac2b44d1b658c876.zip |
Convert rpmtsOrder() to manipulate the tsort data from tsortInfo directly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/order.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/order.c b/lib/order.c index d13211ccd..1b1c73e97 100644 --- a/lib/order.c +++ b/lib/order.c @@ -605,15 +605,16 @@ int rpmtsOrder(rpmts ts) treex = 0; pi = rpmtsiInit(ts); while ((p = rpmtsiNext(pi, 0)) != NULL) { - int npreds = rpmteTSI(p)->tsi_count; - - (void) rpmteSetNpreds(p, npreds); - (void) rpmteSetDepth(p, 1); + tsortInfo p_tsi = rpmteTSI(p); + + int npreds = p_tsi->tsi_count; + p_tsi->npreds = npreds; + p_tsi->depth = 1; if (npreds == 0) - (void) rpmteSetTree(p, treex++); + p_tsi->tree = treex++; else - (void) rpmteSetTree(p, -1); + p_tsi->tree = -1; } pi = rpmtsiFree(pi); ts->ntrees = treex; |