From d9353ad07d5acd842eba94032b932a7db9d77a1e Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 5 Mar 2008 15:15:58 +0000 Subject: [PATCH] - add HEADEREND - reindent --- src/policy.c | 19 +++++++++---------- src/pool.c | 1 + src/pool.h | 3 ++- src/util.h | 7 ------- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/policy.c b/src/policy.c index 4ce160d..ad7bb83 100644 --- a/src/policy.c +++ b/src/policy.c @@ -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; } diff --git a/src/pool.c b/src/pool.c index 4852054..869df6c 100644 --- a/src/pool.c +++ b/src/pool.c @@ -108,6 +108,7 @@ static const char *initpool_data[] = { "solvable:isvisible", /* from susetags */ "solvable:patchcategory", + "solvable:headerend", 0 }; diff --git a/src/pool.h b/src/pool.h index fa4077d..bd55362 100644 --- a/src/pool.h +++ b/src/pool.h @@ -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 */ diff --git a/src/util.h b/src/util.h index 3d082ab..db2415d 100644 --- a/src/util.h +++ b/src/util.h @@ -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 */ -- 2.7.4