Author: coolo Date: Sun Oct 28 20:05:49 2007 New Revision: 7672 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7672&view=rev Log: don't play with pointers Modified: trunk/sat-solver/tools/repo_helix.c Modified: trunk/sat-solver/tools/repo_helix.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_helix.c?rev=7672&r1=7671&r2=7672&view=diff ============================================================================== --- trunk/sat-solver/tools/repo_helix.c (original) +++ trunk/sat-solver/tools/repo_helix.c Sun Oct 28 20:05:49 2007 @@ -637,9 +637,15 @@ /* this is either a kernel package or a kmp */ if (s->provides) { + int prov; npr = 0; - for (pidp = pd->repo->idarraydata + s->provides; (pid = *pidp++) != 0; ) + for ( prov = s->provides; ( pidp = pd->repo->idarraydata + prov) != 0; ++prov) { + if (!*pidp) + break; + + pid = *pidp; + const char *depname = 0; Reldep *prd = 0; @@ -674,9 +680,16 @@ if (s->requires) { + int reqs; npr = 0; - for (pidp = pd->repo->idarraydata + s->requires; (pid = *pidp++) != 0; ) + + for ( reqs = s->requires; ( pidp = pd->repo->idarraydata + reqs) != 0; ++reqs) { + if (!*pidp) + break; + + pid = *pidp; + const char *depname = 0; Reldep *prd = 0; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org