From: Rusty Russell Date: Wed, 29 Jul 2009 23:05:31 +0000 (+0930) Subject: Fix up non-TDB_TRACE compile. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=43ae196c43d739ee06dbe31e0032f1b5fe811e3b;ds=sidebyside Fix up non-TDB_TRACE compile. --- diff --git a/ccan/tdb/open.c b/ccan/tdb/open.c index d91f898b..0292920c 100644 --- a/ccan/tdb/open.c +++ b/ccan/tdb/open.c @@ -349,8 +349,9 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, if (!tdb) return NULL; +#ifdef TDB_TRACE close(tdb->tracefd); - +#endif if (tdb->map_ptr) { if (tdb->flags & TDB_INTERNAL) SAFE_FREE(tdb->map_ptr); @@ -410,7 +411,9 @@ int tdb_close(struct tdb_context *tdb) } } +#ifdef TDB_TRACE close(tdb->tracefd); +#endif memset(tdb, 0, sizeof(*tdb)); SAFE_FREE(tdb);