X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Fisamb.c;h=91cedb003128e913180bcf2b38a91688b90e92d7;hb=9352bc51ad89424a299ef67def1fb20436682a85;hp=72bb842cc1ce2a02a9c8eedc80a6a91db6feefda;hpb=83bf26c44f20a65c1a07e1fcb59649540a3c2193;p=idzebra-moved-to-github.git diff --git a/isamb/isamb.c b/isamb/isamb.c index 72bb842..91cedb0 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -1,4 +1,4 @@ -/* $Id: isamb.c,v 1.63 2005-01-02 18:50:53 adam Exp $ +/* $Id: isamb.c,v 1.65 2005-01-03 11:02:42 adam Exp $ Copyright (C) 1995-2005 Index Data Aps @@ -492,7 +492,7 @@ struct ISAMB_block *new_block (ISAMB b, int leaf, int cat) } yaz_log (b->log_freelist, "got block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, cat, p->pos/CAT_MAX); - memcpy (&b->file[cat].head.free_list, p->buf, sizeof(int)); + memcpy (&b->file[cat].head.free_list, p->buf, sizeof(zint)); } p->cat = cat; b->file[cat].head_dirty = 1; @@ -559,7 +559,7 @@ void close_block (ISAMB b, struct ISAMB_block *p) { yaz_log (b->log_freelist, "release block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, p->cat, p->pos/CAT_MAX); - memcpy (p->buf, &b->file[p->cat].head.free_list, sizeof(int)); + memcpy (p->buf, &b->file[p->cat].head.free_list, sizeof(zint)); b->file[p->cat].head.free_list = p->pos; if (!get_block (b, p->pos, p->buf, 1)) { @@ -1098,7 +1098,7 @@ ISAMB_P isamb_merge (ISAMB b, ISAMC_P pos, ISAMC_I *stream) char *dst = p2->bytes + p2->size; encode_ptr (&dst, p->pos); - assert (sub_size < 40); + assert (sub_size < 80 && sub_size > 1); encode_ptr (&dst, sub_size); memcpy (dst, sub_item, sub_size); dst += sub_size;