WS + reformat updates
[idzebra-moved-to-github.git] / bfile / bfile.c
index facec01..c5de537 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: bfile.c,v 1.40 2005-03-30 09:25:23 adam Exp $
+/* $Id: bfile.c,v 1.42 2005-04-18 08:05:28 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -30,6 +30,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <unistd.h>
 #endif
 
+#include <yaz/xmalloc.h>
 #include <idzebra/util.h>
 #include <idzebra/bfile.h>
 #include "mfile.h"
@@ -211,8 +212,8 @@ int bf_xclose (BFile bf, int version, const char *more_info)
 {
     if (bf->header_dirty)
     {
-       assert(bf->alloc_buf);
        zint pos = 0;
+       assert(bf->alloc_buf);
        assert(bf->magic);
        sprintf(bf->alloc_buf, "%s %d " ZINT_FORMAT " " ZINT_FORMAT " ", 
                bf->magic, version, bf->last_block, bf->free_list);