1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixes to eliminate valgrind warnings.

sql/rpl_record.cc:
  Factoring out expression and putting it in an auto variable.
sql/rpl_utility.cc:
  Removing a check that causes compile warnings.
sql/rpl_utility.h:
  Ensuring that there is enough memory for the metadata, to avoid reads
  from uninitialized memory. Initializing the memory to keep valgrind
  quiet.
This commit is contained in:
unknown
2007-08-03 17:12:00 +02:00
parent 6df75c85fd
commit a04dff19f3
3 changed files with 15 additions and 10 deletions

View File

@ -65,10 +65,14 @@ public:
m_field_metadata(0), m_null_bits(0), m_memory(NULL)
{
m_memory= (uchar *)my_multi_malloc(MYF(MY_WME),
&m_type, size,
&m_field_metadata, size * sizeof(short),
&m_null_bits, (m_size + 7) / 8,
NULL);
&m_type, size,
&m_field_metadata,
size * sizeof(uint16),
&m_null_bits, (size + 7) / 8,
NULL);
bzero(m_field_metadata, size * sizeof(uint16));
if (m_type)
memcpy(m_type, types, size);
else