~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/records.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:
430
430
  }
431
431
 
432
432
  // We have to allocate one more byte to use uint3korr (see comments for it)
433
 
  if (cache_records <= 2 ||
434
 
      !(cache=(unsigned char*) malloc(local_rec_cache_size + cache_records * struct_length + 1)))
435
 
  {
 
433
  if (cache_records <= 2)
436
434
    return false;
437
 
  }
 
435
  cache= (unsigned char*) malloc(local_rec_cache_size + cache_records * struct_length + 1);
438
436
#ifdef HAVE_VALGRIND
439
437
  // Avoid warnings in qsort
440
438
  memset(cache, 0, local_rec_cache_size + cache_records * struct_length + 1);