diff options
author | Sverker Eriksson <[email protected]> | 2018-09-07 19:35:15 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-09-07 19:35:15 +0200 |
commit | 50459bca9fd60733f9b354b2a2a4672fd8dc77e9 (patch) | |
tree | 7d1a6fe5c9d202245841d79f7afadf9dccbe5a62 /erts/emulator/beam/erl_db_util.c | |
parent | 26e03d10c6c51868640869da8b091efdeab28bb0 (diff) | |
download | otp-50459bca9fd60733f9b354b2a2a4672fd8dc77e9.tar.gz otp-50459bca9fd60733f9b354b2a2a4672fd8dc77e9.tar.bz2 otp-50459bca9fd60733f9b354b2a2a4672fd8dc77e9.zip |
erts: Beautify away #ifdef DEBUG
"(void)result" will silence warning about unused variable
and compiler will optimize away such unused variables.
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index f1d47326b4..a78623f490 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -3118,9 +3118,7 @@ void* db_store_term_comp(DbTableCommon *tb, DbTerm* old, Uint offset, Eterm obj) Uint new_sz = offset + db_size_dbterm_comp(tb, obj); byte* basep; DbTerm* newp; -#ifdef DEBUG byte* top; -#endif ASSERT(tb->compress); if (old != 0) { @@ -3142,11 +3140,8 @@ void* db_store_term_comp(DbTableCommon *tb, DbTerm* old, Uint offset, Eterm obj) } newp->size = size_object(obj); -#ifdef DEBUG - top = -#endif - copy_to_comp(tb, obj, newp, new_sz); - ASSERT(top <= basep + new_sz); + top = copy_to_comp(tb, obj, newp, new_sz); + ASSERT(top <= basep + new_sz); (void)top; /* ToDo: Maybe realloc if ((basep+new_sz) - top) > WASTED_SPACE_LIMIT */ |