Simpler mdb_txn_commit().

mt_env is always set.
Commit(mt_child) resets mt_child, so parent need not.
mdb.RE/0.9
Hallvard Furuseth 10 years ago
parent ee06adb311
commit 9d6c973f76
  1. 3
      libraries/liblmdb/mdb.c

@ -3287,12 +3287,11 @@ mdb_txn_commit(MDB_txn *txn)
unsigned int i; unsigned int i;
MDB_env *env; MDB_env *env;
if (txn == NULL || txn->mt_env == NULL) if (txn == NULL)
return EINVAL; return EINVAL;
if (txn->mt_child) { if (txn->mt_child) {
rc = mdb_txn_commit(txn->mt_child); rc = mdb_txn_commit(txn->mt_child);
txn->mt_child = NULL;
if (rc) if (rc)
goto fail; goto fail;
} }

Loading…
Cancel
Save