~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/queues.cc

  • Committer: Monty Taylor
  • Date: 2008-12-07 23:42:51 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081207234251-yxtbg06jpylwej29
Finally removed all of the my_malloc stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
               bool max_at_top, queue_compare compare,
54
54
               void *first_cmp_arg)
55
55
{
56
 
  if ((queue->root= (unsigned char **) my_malloc((max_elements+1)*sizeof(void*),
57
 
                                         MYF(MY_WME))) == 0)
 
56
  if ((queue->root=
 
57
      (unsigned char **) malloc((max_elements+1)*sizeof(void*))) == 0)
58
58
    return(1);
59
59
  queue->elements=0;
60
60
  queue->compare=compare;
163
163
  unsigned char **new_root;
164
164
  if (queue->max_elements == max_elements)
165
165
    return(0);
166
 
  if ((new_root= (unsigned char **) my_realloc((void *)queue->root,
167
 
                                      (max_elements+1)*sizeof(void*),
168
 
                                      MYF(MY_WME))) == 0)
 
166
  if ((new_root=
 
167
         (unsigned char **) realloc(queue->root,
 
168
                                    (max_elements+1)*sizeof(void*))) == 0)
169
169
    return(1);
170
170
  set_if_smaller(queue->elements, max_elements);
171
171
  queue->max_elements= max_elements;