From: Michael Matz Date: Tue, 29 Jan 2008 17:24:52 +0000 (+0000) Subject: Small nit. X-Git-Tag: BASE-SuSE-Code-12_1-Branch~1003 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92f16db80a1b6c7cf3a8bd727b65da9ab0126476;p=platform%2Fupstream%2Flibsolv.git Small nit. --- diff --git a/src/repodata.c b/src/repodata.c index 8d99429..bcfe477 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -127,9 +127,9 @@ data_skip(unsigned char *dp, int type) static unsigned char * data_fetch(unsigned char *dp, KeyValue *kv, Repokey *key) { + kv->eof = 1; if (!dp) return 0; - kv->eof = 1; switch (key->type) { case TYPE_VOID: @@ -471,8 +471,9 @@ repodata_search(Repodata *data, Id entry, Id keyname, int (*callback)(void *cbda do { ddp = data_fetch(ddp, &kv, key); - if (ddp) - stop = callback(cbdata, data->repo->pool->solvables + data->start + entry, data, key, &kv); + if (!ddp) + break; + stop = callback(cbdata, data->repo->pool->solvables + data->start + entry, data, key, &kv); } while (!kv.eof && !stop); if (onekey || stop > SEARCH_NEXT_KEY)