Commit 7e7235fa authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: offsetof instead of my_offsetof

mdl_hash_function(): Use plain offsetof; MDL_key has standard layout.
parent 1c7dd233
...@@ -777,7 +777,7 @@ int mdl_iterate(mdl_iterator_callback callback, void *arg) ...@@ -777,7 +777,7 @@ int mdl_iterate(mdl_iterator_callback callback, void *arg)
my_hash_value_type mdl_hash_function(CHARSET_INFO *cs, my_hash_value_type mdl_hash_function(CHARSET_INFO *cs,
const uchar *key, size_t length) 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(); return mdl_key->hash_value();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment