~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/array.c

  • Committer: Brian Aker
  • Date: 2008-07-18 20:10:26 UTC
  • mfrom: (51.3.29 remove-dbug)
  • Revision ID: brian@tangent.org-20080718201026-tto5golt0xhwqe4a
Merging in Jay's final patch on dbug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                            void *init_buffer, uint init_alloc, 
45
45
                            uint alloc_increment CALLER_INFO_PROTO)
46
46
{
47
 
  DBUG_ENTER("init_dynamic_array");
48
47
  if (!alloc_increment)
49
48
  {
50
49
    alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16);
62
61
  array->alloc_increment=alloc_increment;
63
62
  array->size_of_element=element_size;
64
63
  if ((array->buffer= init_buffer))
65
 
    DBUG_RETURN(false);
 
64
    return(false);
66
65
  if (!(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc,
67
66
                                            MYF(MY_WME))))
68
67
  {
69
68
    array->max_element=0;
70
 
    DBUG_RETURN(true);
 
69
    return(true);
71
70
  }
72
 
  DBUG_RETURN(false);
 
71
  return(false);
73
72
74
73
 
75
74
bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
278
277
{
279
278
  if (idx >= array->elements)
280
279
  {
281
 
    DBUG_PRINT("warning",("To big array idx: %d, array size is %d",
282
 
                          idx,array->elements));
283
280
    bzero(element,array->size_of_element);
284
281
    return;
285
282
  }