]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- add HEADEREND
authorMichael Schroeder <mls@suse.de>
Wed, 5 Mar 2008 15:15:58 +0000 (15:15 +0000)
committerMichael Schroeder <mls@suse.de>
Wed, 5 Mar 2008 15:15:58 +0000 (15:15 +0000)
- reindent

src/policy.c
src/pool.c
src/pool.h
src/util.h

index 4ce160dd0824c14925dc751e8c2d2d723fc84b79..ad7bb83311f79070886d59091e92f4ae52a9a003 100644 (file)
@@ -59,16 +59,15 @@ prune_best_version_arch_sortcmp(const void *ap, const void *bp)
            return 1;
        }
       return strcmp(na, nb);
-    } else {
-       /* the same name */
-       if ( pool->solvables[a].evr == pool->solvables[b].evr)
-       {
-           /* prefer installed solvables first */
-           if (solv->installed && pool->solvables[a].repo == solv->installed)
-               return -1;
-           if (solv->installed && pool->solvables[b].repo == solv->installed)
-               return 1;       
-       }
+    }
+  /* the same name */
+  if (pool->solvables[a].evr == pool->solvables[b].evr && solv->installed)
+    {
+       /* prefer installed solvables */
+      if (pool->solvables[a].repo == solv->installed)
+       return -1;
+      if (pool->solvables[b].repo == solv->installed)
+       return 1;       
     }
   return a - b;
 }
index 48520545a29f29ec3192393e263fcefb5283ff2e..869df6c10c1a5070175939e7a01e871ac7fc6027 100644 (file)
@@ -108,6 +108,7 @@ static const char *initpool_data[] = {
   "solvable:isvisible",                        /* from susetags */
 
   "solvable:patchcategory",
+  "solvable:headerend",
 
   0
 };
index fa4077d64159780e8a90aedb32f66c1095b15e5e..bd55362d7ad753a198d90a0e3cf4ce372511ef3b 100644 (file)
@@ -103,8 +103,9 @@ extern "C" {
 #define SOLVABLE_ISVISIBLE     63
 
 #define SOLVABLE_PATCHCATEGORY 64
+#define SOLVABLE_HEADEREND      65
 
-#define ID_NUM_INTERNAL                65
+#define ID_NUM_INTERNAL                66
 
 
 /* well known solvable */
index 3d082ab605e27af1fef972214d63f1ac041c3b5d..db2415d4bde40f9afe27bf997946bfef30124a22 100644 (file)
@@ -44,11 +44,4 @@ static inline void *sat_extend_resize(void *buf, size_t len, size_t size, size_t
   return buf;
 }
 
-static inline void *sat_extend_cleanup(void *buf, size_t len, size_t size)
-{
-  if (len)
-    buf = sat_realloc2(buf, len, size);
-  return buf;
-}
-
 #endif /* SATSOLVER_UTIL_H */