From: ewt Date: Mon, 19 Feb 1996 04:28:31 +0000 (+0000) Subject: 1) silly bug left over from getting rid of mutable flag X-Git-Tag: tznext/4.11.0.1.tizen20130304~11647 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=149130ecc155581ea2640cf235b0da512af8c5fe;p=tools%2Flibrpm-tizen.git 1) silly bug left over from getting rid of mutable flag 2) getEntry should set pointer to NULL when it returns 0 CVS patchset: 313 CVS date: 1996/02/19 04:28:31 --- diff --git a/lib/header.c b/lib/header.c index 20ef8d4..dcb609b 100644 --- a/lib/header.c +++ b/lib/header.c @@ -598,7 +598,7 @@ static struct indexEntry *findEntry(Header h, int_32 tag) struct indexEntry *index = h->index; int x = h->entries_used; - if (! h->fully_sorted) { + if (h->fully_sorted) { return bsearch(&tag, index, x, sizeof(struct indexEntry), tagCompare); } else { while (x && (tag != index->tag)) { @@ -624,6 +624,7 @@ int getEntry(Header h, int_32 tag, int_32 * type, void **p, int_32 * c) /* First find the tag */ index = findEntry(h, tag); if (! index) { + **p = NULL; return 0; }