aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.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_hash.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_hash.c')
-rw-r--r--erts/emulator/beam/erl_db_hash.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index 21af322632..569419265b 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -2132,16 +2132,14 @@ static int mtraversal_select_replace_on_match_res(void* context_ptr, Sint slot_i
{
mtraversal_select_replace_context_t* sr_context_ptr = (mtraversal_select_replace_context_t*) context_ptr;
DbTableHash* tb = sr_context_ptr->tb;
-#ifdef DEBUG
- Eterm key = NIL;
-#endif
- HashDbTerm* new = NULL;
- HashDbTerm* next = NULL;
- HashValue hval = INVALID_HASH;
+ HashDbTerm* new;
+ HashDbTerm* next;
+ HashValue hval;
if (is_value(match_res)) {
#ifdef DEBUG
- ASSERT(is_value(key = db_getkey(tb->common.keypos, match_res)));
+ Eterm key = db_getkey(tb->common.keypos, match_res);
+ ASSERT(is_value(key));
ASSERT(eq(key, GETKEY(tb, (**current_ptr_ptr)->dbterm.tpl)));
#endif
next = (**current_ptr_ptr)->next;