From: Michael Schroeder Date: Mon, 22 Apr 2013 09:18:35 +0000 (+0200) Subject: small cleanup in id2str X-Git-Tag: BASE-SuSE-Code-12_3-Branch~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48bc34b3bbf58d8571e43e438955915ef6cae78a;p=thirdparty%2Flibsolv.git small cleanup in id2str --- 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]; }