~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/filesort.cc

  • Committer: Mark Atwood
  • Date: 2011-06-19 18:31:57 UTC
  • mfrom: (2318.6.8 refactor12)
  • Revision ID: me@mark.atwood.name-20110619183157-jg8823cpkobu7n6d
Tags: 2011.06.20
mergeĀ lp:~olafvdspek/drizzle/refactor12

Show diffs side-by-side

added added

removed removed

Lines of Context:
449
449
static char **make_char_array(char **old_pos, uint32_t fields,
450
450
                              uint32_t length)
451
451
{
452
 
  char **pos;
453
 
  char *char_pos;
454
 
 
455
 
  if (old_pos ||
456
 
      (old_pos= (char**) malloc((uint32_t) fields*(length+sizeof(char*))))) // todo: remove malloc check
457
 
  {
458
 
    pos=old_pos; char_pos=((char*) (pos+fields)) -length;
459
 
    while (fields--) *(pos++) = (char_pos+= length);
460
 
  }
461
 
 
462
 
  return(old_pos);
 
452
  if (not old_pos)
 
453
    old_pos= (char**) malloc((uint32_t) fields * (length + sizeof(char*)));
 
454
  char** pos= old_pos; 
 
455
  char* char_pos= ((char*) (pos+fields)) - length;
 
456
  while (fields--) 
 
457
    *(pos++) = (char_pos+= length);
 
458
 
 
459
  return old_pos;
463
460
} /* make_char_array */
464
461
 
465
462