mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-16264: Eliminate unsafe os_aio_userdata_t type cast
This commit is contained in:
parent
8be3794b42
commit
c7920fa8ff
3 changed files with 8 additions and 2 deletions
|
|
@ -1350,6 +1350,12 @@ struct os_aio_userdata_t
|
|||
fil_node_t* node;
|
||||
IORequest type;
|
||||
void* message;
|
||||
|
||||
os_aio_userdata_t(fil_node_t*node, IORequest type, void*message) :
|
||||
node(node), type(type), message(message) {}
|
||||
|
||||
/** Construct from tpool::aiocb::m_userdata[] */
|
||||
os_aio_userdata_t(const char *buf) { memcpy((void*)this, buf, sizeof*this); }
|
||||
};
|
||||
/**
|
||||
NOTE! Use the corresponding macro os_aio(), not directly this function!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue