X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dict%2Fdopen.c;h=5d72410f8e8013d25c3842d84daa50329d1a2b68;hb=ce0c8ffd1c3471504b638f6b47a0e85bf1b6f24f;hp=2062ecfcd42b90b48077d21d8f9cc5a48a6bc1d8;hpb=4478d785b7769691261005c98063b98a5a5971b3;p=idzebra-moved-to-github.git diff --git a/dict/dopen.c b/dict/dopen.c index 2062ecf..5d72410 100644 --- a/dict/dopen.c +++ b/dict/dopen.c @@ -1,8 +1,5 @@ -/* $Id: dopen.c,v 1.14 2006-08-14 10:40:09 adam Exp $ - Copyright (C) 1995-2006 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1994-2009 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 @@ -80,7 +77,10 @@ Dict_BFile dict_bf_open (BFiles bfs, const char *name, int block_size, dbf = (Dict_BFile) xmalloc (sizeof(*dbf)); dbf->bf = bf_open (bfs, name, block_size, rw); if (!dbf->bf) - return NULL; + { + xfree(dbf); + return 0; + } common_init (dbf, block_size, cache); return dbf; } @@ -92,6 +92,7 @@ void dict_bf_compact (Dict_BFile dbf) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab