~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_hash.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-14 20:42:14 UTC
  • mto: (2318.6.3 refactor7)
  • mto: This revision was merged to the branch mainline in revision 2337.
  • Revision ID: olafvdspek@gmail.com-20110614204214-gswvc2b6fr113758
Remove malloc NULL check. Just die.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
           hash_free_key free_element, uint32_t flags)
56
56
{
57
57
  hash->records=0;
58
 
  if (my_init_dynamic_array_ci(&hash->array, sizeof(HASH_LINK), size,
59
 
                               growth_size))
60
 
  {
61
 
    /* Allow call to hash_free */
62
 
    hash->free=0;
63
 
    return true;
64
 
  }
 
58
  my_init_dynamic_array_ci(&hash->array, sizeof(HASH_LINK), size, growth_size);
65
59
  hash->key_offset=key_offset;
66
60
  hash->key_length=key_length;
67
61
  hash->blength=1;
69
63
  hash->free=free_element;
70
64
  hash->flags=flags;
71
65
  hash->charset=charset;
72
 
  return false;
 
66
  return false; // return void
73
67
}
74
68
 
75
69