From: Michael Schroeder Date: Mon, 29 Oct 2007 11:20:32 +0000 (+0000) Subject: - cleanup strange code X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~868 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32af58a5cc2480985fb27ff95207053ee69337d7;p=thirdparty%2Flibsolv.git - cleanup strange code --- diff --git a/tools/repo_helix.c b/tools/repo_helix.c index 47975e1a..0a5d1399 100644 --- a/tools/repo_helix.c +++ b/tools/repo_helix.c @@ -632,20 +632,15 @@ endElement(void *userData, const char *name) char *cflavor = strdup(flavor); /* make pointer safe */ Id npr; - Id pid, *pidp; + Id pid; /* this is either a kernel package or a kmp */ if (s->provides) { - int prov; + Offset prov = s->provides; npr = 0; - for ( prov = s->provides; ( pidp = pd->repo->idarraydata + prov) != 0; ++prov) + while ((pid = pd->repo->idarraydata[prov++]) != 0) { - if (!*pidp) - break; - - pid = *pidp; - const char *depname = 0; Reldep *prd = 0; @@ -680,16 +675,10 @@ endElement(void *userData, const char *name) if (s->requires) { - int reqs; + Offset reqs = s->requires; npr = 0; - - for ( reqs = s->requires; ( pidp = pd->repo->idarraydata + reqs) != 0; ++reqs) + while ((pid = pd->repo->idarraydata[reqs++]) != 0) { - if (!*pidp) - break; - - pid = *pidp; - const char *depname = 0; Reldep *prd = 0;