author | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-04-20 17:48:21 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-04-20 17:48:21 UTC |
parent | e54a300c3712418f55ce6c6da64ae79c92d87886 |
nmdb/be-bdb.c | +2 | -0 |
nmdb/be-tc.c | +1 | -1 |
diff --git a/nmdb/be-bdb.c b/nmdb/be-bdb.c index 8233fd3..33a3f0f 100644 --- a/nmdb/be-bdb.c +++ b/nmdb/be-bdb.c @@ -3,6 +3,7 @@ #include <string.h> /* memset() */ #include <stddef.h> /* NULL */ +#include <stdlib.h> /* malloc() and friends */ /* typedefs to work around db.h include bug */ typedef unsigned int u_int; @@ -40,6 +41,7 @@ struct db_conn *bdb_open(const char *name, int flags) if (db == NULL) { bdb_db->close(bdb_db, 0); return NULL; + } db->conn = bdb_db; db->set = bdb_set; diff --git a/nmdb/be-tc.c b/nmdb/be-tc.c index a035626..2b45057 100644 --- a/nmdb/be-tc.c +++ b/nmdb/be-tc.c @@ -20,7 +20,7 @@ struct db_conn *tc_open(const char *name, int flags) struct db_conn *db; TCHDB *tc_db = tchdbnew(); - if (!tchdbopen(qdbm_db, name, HDBOWRITER | HDBOCREAT)) + if (!tchdbopen(tc_db, name, HDBOWRITER | HDBOCREAT)) return NULL; db = malloc(sizeof(struct db_conn));