Commit bb0c2acf authored by Yoni Fogel's avatar Yoni Fogel

refs #5153 minor cleanups from review

git-svn-id: file:///svn/toku/tokudb@45006 c7de825b-a66e-492c-adef-691d508d4ae1
parent d0227a5e
......@@ -3328,7 +3328,7 @@ toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN t
int r;
FT_HANDLE result_ft_handle;
r = toku_ft_handle_create(&result_ft_handle);
invariant_zero(r);
resource_assert_zero(r);
// we're cloning, so the handle better have an open ft and open cf
invariant(ft_handle->ft);
......
......@@ -1284,8 +1284,7 @@ toku_lt_create(toku_lock_tree** ptree,
}
// allocate a tree, initialized to zeroes
tmp_tree = toku_xmalloc(sizeof(*tmp_tree));
memset(tmp_tree, 0, sizeof(*tmp_tree));
XCALLOC(tmp_tree);
tmp_tree->mgr = mgr;
tmp_tree->compare_fun = compare_fun;
tmp_tree->lock_escalation_allowed = TRUE;
......@@ -1358,7 +1357,7 @@ toku_ltm_get_lt(toku_ltm* mgr, toku_lock_tree** ptree, DICTIONARY_ID dict_id, DE
// mutually null or mutually non-null.
if ((on_close_callback == NULL) != (on_close_callback == NULL)) {
r = EINVAL;
goto out;
goto cleanup;
}
ltm_mutex_lock(mgr);
......@@ -1384,7 +1383,7 @@ toku_ltm_get_lt(toku_ltm* mgr, toku_lock_tree** ptree, DICTIONARY_ID dict_id, DE
if (on_create_callback) {
on_create_callback(tree, on_create_extra);
} else {
assert(on_close_callback == NULL);
invariant(on_close_callback == NULL);
}
tree->on_close_callback = on_close_callback;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment