summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-05-10 15:06:40 +0200
committerLinus Nordberg <linus@nordu.net>2016-05-10 15:06:40 +0200
commita84b320b164ec430806795df28d4b6fd281c43b4 (patch)
treeacc1d6ee945fafa510d40a6cb1362394b9bf1401
parent6f5e1895c247e0a645fde3346216162a8d094360 (diff)
Reverting "Don't follow the NULL pointer."
There are several other instances of accessing NULL, both in permdb.c and filebuffer.c. Fixing one isn't very helpful. This reverts commit 2a63ac24a6c151b47e64a023965eab57ae9b1493.
-rw-r--r--c_src/permdb.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/c_src/permdb.c b/c_src/permdb.c
index a9df1dc..47c9641 100644
--- a/c_src/permdb.c
+++ b/c_src/permdb.c
@@ -430,10 +430,6 @@ permdb_alloc(const char *dbpath)
}
permdb_object *state = malloc(sizeof(permdb_object));
- if (state == NULL) {
- return NULL;
- }
-
state->datafile = bf_open(dbpath, O_RDWR|O_CREAT, "datafile");
state->indexfile = bf_open(idxpath, O_RDWR|O_CREAT, "indexfile");