tdb2: change API to return the error value.
[ccan] / ccan / tdb2 / test / run-57-die-during-transaction.c
index 793636a9f6e9c0b30d9fbabfd358febb8bb1efb2..f9b0426ea02f237bdcc46d4afc5fb3937ccf419f 100644 (file)
@@ -145,6 +145,10 @@ reset:
        unlink(TEST_DBNAME);
        tdb = tdb_open(TEST_DBNAME, TDB_NOMMAP,
                       O_CREAT|O_TRUNC|O_RDWR, 0600, &tap_log_attr);
+       if (!tdb) {
+               diag("Failed opening TDB: %s", strerror(errno));
+               return false;
+       }
 
        if (setjmp(jmpbuf) != 0) {
                /* We're partway through.  Simulate our death. */