~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_open.c

  • Committer: Monty Taylor
  • Date: 2008-12-09 00:00:30 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081209000030-pdziog3bwx1yg1hn
Added some return checking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
571
571
            MI_REC_BUFF_OFFSET : 0);
572
572
    if (extra && newptr)
573
573
      newptr-= MI_REC_BUFF_OFFSET;
574
 
    if (!(newptr=
575
 
          (newptr) ? (unsigned char *) realloc(newptr, length+extra+8)
576
 
                   : (unsigned char *) malloc(length+extra+8)))
 
574
    void *tmpnewptr= NULL;
 
575
    if (!(tmpnewptr= realloc(newptr, length+extra+8))) 
577
576
      return newptr;
 
577
    newptr= tmpnewptr;
578
578
    *((uint32_t *) newptr)= (uint32_t) length;
579
579
    *buf= newptr+(extra ?  MI_REC_BUFF_OFFSET : 0);
580
580
  }