summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:00:06 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:00:06 +0000
commitb8c0f9b7f6cc48ec7c077f6d36bae487559d6548 (patch)
treec3aef0b6c2a9251d6e1c1aa723c4546c88c8eb6a /apt-pkg
parentffd714258b75c88c1ea947b280a360bb29fd6008 (diff)
Fix lame sort errors in priocmp found by Gustavo
Author: jgg Date: 2002-11-28 18:49:16 GMT Fix lame sort errors in priocmp found by Gustavo
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/algorithms.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 3e3675995..9b37385bf 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: algorithms.cc,v 1.43 2002/11/11 06:55:50 doogie Exp $
+// $Id: algorithms.cc,v 1.44 2002/11/28 18:49:16 jgg Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
@@ -1210,14 +1210,14 @@ static int PrioComp(const void *A,const void *B)
pkgCache::VerIterator R(*PrioCache,*(pkgCache::Version **)B);
if ((L.ParentPkg()->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential &&
- (L.ParentPkg()->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential)
- return 1;
+ (R.ParentPkg()->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential)
+ return 1;
if ((L.ParentPkg()->Flags & pkgCache::Flag::Essential) != pkgCache::Flag::Essential &&
- (L.ParentPkg()->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential)
- return -1;
+ (R.ParentPkg()->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential)
+ return -1;
if (L->Priority != R->Priority)
- return L->Priority - R->Priority;
+ return R->Priority - L->Priority;
return strcmp(L.ParentPkg().Name(),R.ParentPkg().Name());
}
void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List)