From 48bc34b3bbf58d8571e43e438955915ef6cae78a Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 22 Apr 2013 11:18:35 +0200 Subject: [PATCH] small cleanup in id2str --- ext/repo_rpmmd.c | 2 +- src/poolid.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ext/repo_rpmmd.c b/ext/repo_rpmmd.c index 603b27be..b545df51 100644 --- a/ext/repo_rpmmd.c +++ b/ext/repo_rpmmd.c @@ -518,7 +518,7 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, const char **atts else id = name; #if 0 - fprintf(stderr, "new dep %s%s%s\n", pool_id2str(pool, d), id2rel(pool, d), id2evr(pool, d)); + fprintf(stderr, "new dep %s\n", pool_dep2str(pool, id)); #endif return repo_addid_dep(pd->repo, olddeps, id, marker); } diff --git a/src/poolid.c b/src/poolid.c index bd24e354..cc1b6f5f 100644 --- a/src/poolid.c +++ b/src/poolid.c @@ -121,12 +121,10 @@ pool_rel2id(Pool *pool, Id name, Id evr, int flags, int create) const char * pool_id2str(const Pool *pool, Id id) { - if (ISRELDEP(id)) + while (ISRELDEP(id)) { Reldep *rd = GETRELDEP(pool, id); - if (ISRELDEP(rd->name)) - return "REL"; - return pool->ss.stringspace + pool->ss.strings[rd->name]; + id = rd->name; } return pool->ss.stringspace + pool->ss.strings[id]; } -- 2.47.2