summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 41c3d9904..d2d32e52e 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -1031,7 +1031,7 @@ bool pkgAcquire::Queue::Enqueue(ItemDesc &Item)
};
QItem **OptimalI = &Items;
QItem **I = &Items;
- auto insertLocation = std::make_tuple(Item.Owner->FetchAfter(), -Item.Owner->Priority());
+ auto insertLocation = std::make_tuple(Item.Owner->FetchAfter(), Item.Owner->Priority());
// move to the end of the queue and check for duplicates here
for (; *I != 0; ) {
if (Item.URI == (*I)->URI && MetaKeysMatch(Item, *I))
@@ -1045,10 +1045,10 @@ bool pkgAcquire::Queue::Enqueue(ItemDesc &Item)
// Determine the optimal position to insert: before anything with a
// higher priority.
auto queueLocation = std::make_tuple((*I)->GetFetchAfter(),
- -(*I)->GetPriority());
+ (*I)->GetPriority());
I = &(*I)->Next;
- if (queueLocation <= insertLocation)
+ if (queueLocation >= insertLocation)
{
OptimalI = I;
}