aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_tree.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-03-09 16:09:10 +0100
committerGuilherme Andrade <[email protected]>2017-03-22 23:57:55 +0000
commit42ece2ed3a7022adf0568d5cd64d8df8c8e64b4b (patch)
tree6fa6747e27fb12e5d3560eb1e344d129f7b7aa5d /erts/emulator/beam/erl_db_tree.c
parent4855e8bd2d9933020479a4fe684a0cb8bbaf6f21 (diff)
downloadotp-42ece2ed3a7022adf0568d5cd64d8df8c8e64b4b.tar.gz
otp-42ece2ed3a7022adf0568d5cd64d8df8c8e64b4b.tar.bz2
otp-42ece2ed3a7022adf0568d5cd64d8df8c8e64b4b.zip
Cleanup some unnecessary variable initialization
Diffstat (limited to 'erts/emulator/beam/erl_db_tree.c')
-rw-r--r--erts/emulator/beam/erl_db_tree.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_db_tree.c b/erts/emulator/beam/erl_db_tree.c
index 949f8c46b6..fadd63be34 100644
--- a/erts/emulator/beam/erl_db_tree.c
+++ b/erts/emulator/beam/erl_db_tree.c
@@ -3459,10 +3459,7 @@ static int doit_select_replace(DbTableTree *tb, TreeDbTerm **this, void *ptr,
int forward)
{
struct select_replace_context *sc = (struct select_replace_context *) ptr;
- Eterm ret = NIL;
-#ifdef DEBUG
- Eterm key = NIL;
-#endif
+ Eterm ret;
sc->lastobj = (*this)->dbterm.tpl;
@@ -3477,8 +3474,9 @@ static int doit_select_replace(DbTableTree *tb, TreeDbTerm **this, void *ptr,
if (is_value(ret)) {
#ifdef DEBUG
- ASSERT(is_value(key = db_getkey(tb->common.keypos, ret)));
- ASSERT(cmp_key(tb, key, *this) == 0);
+ Eterm key = db_getkey(tb->common.keypos, ret);
+ ASSERT(is_value(key));
+ ASSERT(cmp_key(tb, key, old) == 0);
#endif
*this = replace_dbterm(tb, *this, ret);
sc->lastobj = (*this)->dbterm.tpl;