diff options
author | Michael Schroeder <mls@suse.de> | 2014-05-07 14:32:14 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-05-07 14:32:14 +0200 |
commit | 08382265e737225adba8fd24e9c97e966d280b2d (patch) | |
tree | faac29e73de087b92c710af04d5def0a3332c1f9 | |
parent | 576a302dc857615f37e3cecc1140970414590c75 (diff) | |
download | libsolv-08382265e737225adba8fd24e9c97e966d280b2d.tar.gz libsolv-08382265e737225adba8fd24e9c97e966d280b2d.tar.bz2 libsolv-08382265e737225adba8fd24e9c97e966d280b2d.zip |
opencode some values in pool_id2rel (thanks Thierry Vignaud)
-rw-r--r-- | src/poolid.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/poolid.c b/src/poolid.c index 285ecaa..5fe502b 100644 --- a/src/poolid.c +++ b/src/poolid.c @@ -151,23 +151,25 @@ pool_id2rel(const Pool *pool, Id id) rd = GETRELDEP(pool, id); switch (rd->flags) { - case 0: case 2: case 3: - case 6: case 7: + /* debian special cases < and > */ + /* haiku special cases <> (maybe we should use != for the others as well */ + case 0: case REL_EQ: case REL_GT | REL_EQ: + case REL_LT | REL_EQ: case REL_LT | REL_EQ | REL_GT: #if !defined(DEBIAN) && !defined(MULTI_SEMANTICS) - case 1: case 4: + case REL_LT: case REL_GT: #endif #if !defined(HAIKU) && !defined(MULTI_SEMANTICS) - case 5: + case REL_LT | REL_GT: #endif return rels[rd->flags]; #if defined(DEBIAN) || defined(MULTI_SEMANTICS) - case 1: + case REL_GT: return pool->disttype == DISTTYPE_DEB ? " >> " : rels[rd->flags]; - case 4: + case REL_LT: return pool->disttype == DISTTYPE_DEB ? " << " : rels[rd->flags]; #endif #if defined(HAIKU) || defined(MULTI_SEMANTICS) - case 5: + case REL_LT | REL_GT: return pool->disttype == DISTTYPE_HAIKU ? " != " : rels[rd->flags]; #endif case REL_AND: |