~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/completion_hash.cc

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *
18
18
 * by  Andi Gutmans <andi@zend.com>
19
19
 * and Zeev Suraski <zeev@zend.com>
20
 
 * Small portability changes by Monty.
 
20
 * Small portability changes by Monty. Changed also to use my_malloc/my_free
21
21
 */
22
22
 
23
23
#include "client_priv.h"
40
40
 
41
41
int completion_hash_init(HashTable *ht, uint nSize)
42
42
{
43
 
  ht->arBuckets = (Bucket **) malloc(nSize* sizeof(Bucket *));
44
 
  memset(ht->arBuckets, 0, nSize* sizeof(Bucket *));
 
43
  ht->arBuckets = (Bucket **) my_malloc(nSize* sizeof(Bucket *),
 
44
                                        MYF(MY_ZEROFILL | MY_WME));
45
45
 
46
46
  if (!ht->arBuckets)
47
47
  {
211
211
void completion_hash_free(HashTable *ht)
212
212
{
213
213
  completion_hash_clean(ht);
214
 
  free(ht->arBuckets);
 
214
  my_free(ht->arBuckets, MYF(0));
215
215
}
216
216
 
217
217