Cleanup: offsetof instead of my_offsetof

mdl_hash_function(): Use plain offsetof; MDL_key has standard layout.
This commit is contained in:
Marko Mäkelä 2021-11-24 09:55:29 +02:00
parent 1c7dd233a7
commit 7e7235faa9

View File

@ -777,7 +777,7 @@ int mdl_iterate(mdl_iterator_callback callback, void *arg)
my_hash_value_type mdl_hash_function(CHARSET_INFO *cs,
const uchar *key, size_t length)
{
MDL_key *mdl_key= (MDL_key*) (key - my_offsetof(MDL_key, m_ptr));
MDL_key *mdl_key= (MDL_key*) (key - offsetof(MDL_key, m_ptr));
return mdl_key->hash_value();
}