X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=bfile%2Fbfile.c;h=5ee546084840a200536e4bdf711fb86c2ad9cf71;hp=07af21718f6911f99a835eef6c88130cd6b8f9e1;hb=HEAD;hpb=ac13dceecd5f75669820819575daf88e0add5c8d diff --git a/bfile/bfile.c b/bfile/bfile.c index 07af217..5ee5460 100644 --- a/bfile/bfile.c +++ b/bfile/bfile.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2011 Index Data + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -177,7 +177,7 @@ BFile bf_xopen(BFiles bfs, const char *name, int block_size, int wrflag, bf->alloc_buf_size = HEADER_SIZE; else bf->alloc_buf_size = bf->block_size; - + hbuf = bf->alloc_buf = xmalloc(bf->alloc_buf_size); /* fill-in default values */ @@ -243,7 +243,7 @@ int bf_xclose(BFile bf, int version, const char *more_info) zint pos = 0; assert(bf->alloc_buf); assert(bf->magic); - sprintf(bf->alloc_buf, "%s %d " ZINT_FORMAT " " ZINT_FORMAT " ", + sprintf(bf->alloc_buf, "%s %d " ZINT_FORMAT " " ZINT_FORMAT " ", bf->magic, version, bf->last_block, bf->free_list); if (more_info) strcat(bf->alloc_buf, more_info); @@ -337,7 +337,7 @@ int bf_read2(BFile bf, zint no, int offset, int nbytes, void *buf) if ((ret = cf_read(bf->cf, no, offset, nbytes, buf)) == 0) ret = mf_read(bf->mf, no, offset, nbytes, buf); } - else + else ret = mf_read(bf->mf, no, offset, nbytes, buf); zebra_lock_rdwr_runlock(&bf->rdwr_lock); return ret;