mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: thd->alloc<>() and thd->calloc<>()
create templates thd->alloc<X>(n) to use instead of (X*)thd->alloc(sizeof(X)*n) and the same for thd->calloc(). By the default the type is char, so old usage of thd->alloc(size) works too.
This commit is contained in:
@@ -949,7 +949,7 @@ retry:
|
||||
{
|
||||
DBUG_ASSERT(keyname != 0);
|
||||
|
||||
if (unlikely(!(key= (uchar*) thd->calloc(ALIGN_SIZE(handler->key_len)))))
|
||||
if (unlikely(!(key= thd->calloc<uchar>(ALIGN_SIZE(handler->key_len)))))
|
||||
goto err;
|
||||
if (unlikely((error= table->file->ha_index_or_rnd_end())))
|
||||
break;
|
||||
|
Reference in New Issue
Block a user