Return error (0) rather than exit for bad dict header (magic)
[idzebra-moved-to-github.git] / dict / close.c
index 0044e9a..be53165 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: close.c,v 1.7 2002-08-02 19:26:55 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
-   Index Data Aps
+/* $Id: close.c,v 1.10 2006-03-26 14:02:49 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -27,11 +27,12 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <stdio.h>
 #include <assert.h>
 
-#include <dict.h>
+#include "dict-p.h"
 
 int dict_close (Dict dict)
 {
-    assert (dict);
+    if (!dict)
+       return 0;
 
     if (dict->rw)
     {