diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-01-20 17:59:11 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-01-22 11:39:54 +0100 |
commit | 22ae3843db6c8b2a84ca5d16cd99025abb52cc27 (patch) | |
tree | 78cd7d2f09ac106939cdfdb81e5677ceb9135e22 /sql/sql_lifo_buffer.h | |
parent | 204cb85aab3e6326e9f7a51c478efd6fad44801a (diff) | |
download | mariadb-git-22ae3843db6c8b2a84ca5d16cd99025abb52cc27.tar.gz |
Correct TRASH() macro usage
TRASH was mapped to TRASH_FREE and was supposed to be used for memory
that should not be accessed anymore, while TRASH_ALLOC() is to be
used for uninitialized but to-be-used memory.
But sometimes TRASH() was used in the latter sense.
Remove TRASH() macro, always use explicit TRASH_ALLOC() or TRASH_FREE().
Diffstat (limited to 'sql/sql_lifo_buffer.h')
-rw-r--r-- | sql/sql_lifo_buffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_lifo_buffer.h b/sql/sql_lifo_buffer.h index feec4aeb4c2..f551cc48c23 100644 --- a/sql/sql_lifo_buffer.h +++ b/sql/sql_lifo_buffer.h @@ -84,7 +84,7 @@ public: start= start_arg; end= end_arg; if (end != start) - TRASH(start, end - start); + TRASH_ALLOC(start, end - start); reset(); } @@ -224,7 +224,7 @@ public: { DBUG_ASSERT(unused_end >= unused_start); DBUG_ASSERT(end == unused_start); - TRASH(unused_start, unused_end - unused_start); + TRASH_ALLOC(unused_start, unused_end - unused_start); end= unused_end; } /* Return pointer to start of the memory area that is occupied by the data */ |