X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isam%2Fphysical.c;h=f10f23b9813070b582a31ec57dae2dbe60cc5d87;hb=af7bc27d33843a8e667022f24589450c39f907f2;hp=ce4526fea319d7482b687f30589c8256b1e9a861;hpb=b8d492961ba89859e02543581d097b75a59b546c;p=idzebra-moved-to-github.git diff --git a/isam/physical.c b/isam/physical.c index ce4526f..f10f23b 100644 --- a/isam/physical.c +++ b/isam/physical.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: physical.c,v $ - * Revision 1.11 1996-03-20 13:29:17 quinn + * Revision 1.13 1996-10-29 13:56:57 adam + * Include of zebrautl.h instead of alexutil.h. + * + * Revision 1.12 1996/03/20 16:17:11 quinn + * Bug hunting + * + * Revision 1.11 1996/03/20 13:29:17 quinn * Bug-fix * * Revision 1.10 1996/03/19 19:22:44 quinn @@ -47,6 +53,7 @@ #include #include +#include #include static int is_freestore_alloc(ISAM is, int type) @@ -109,6 +116,7 @@ int is_p_read_partial(is_mtable *tab, is_mblock *block) /* extract header info */ buf->offset = 0; memcpy(&block->num_records, buf->data, sizeof(block->num_records)); + assert(block->num_records > 0); buf->offset += sizeof(block->num_records); memcpy(&block->nextpos, buf->data + buf->offset, sizeof(block->nextpos)); @@ -215,6 +223,7 @@ void is_p_sync(is_mtable *tab) } logf (LOG_DEBUG, "W: Block #%d contains %d records.", p->diskpos, p->num_records); + assert(p->num_records > 0); for (b = p->data; b; b = b->next) { logf(LOG_DEBUG, " buf: offset %d, keys %d, type %d, ref %d",