1) silly bug left over from getting rid of mutable flag
authorewt <devnull@localhost>
Mon, 19 Feb 1996 04:28:31 +0000 (04:28 +0000)
committerewt <devnull@localhost>
Mon, 19 Feb 1996 04:28:31 +0000 (04:28 +0000)
2) getEntry should set pointer to NULL when it returns 0

CVS patchset: 313
CVS date: 1996/02/19 04:28:31

lib/header.c

index 20ef8d4..dcb609b 100644 (file)
@@ -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;
     }