mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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().
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user