allow NULL to be passed for count in getEntry()
authormarc <devnull@localhost>
Mon, 18 Dec 1995 18:00:28 +0000 (18:00 +0000)
committermarc <devnull@localhost>
Mon, 18 Dec 1995 18:00:28 +0000 (18:00 +0000)
CVS patchset: 52
CVS date: 1995/12/18 18:00:28

lib/header.c

index 5397281..554db45 100644 (file)
@@ -412,7 +412,9 @@ int getEntry(Header h, int_32 tag, int_32 * type, void **p, int_32 * c)
        return 0;
     }
     *type = ntohl(index->type);
-    *c = ntohl(index->count);
+    if (c) {
+       *c = ntohl(index->count);
+    }
 
     /* Now look it up */
     switch (*type) {