~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_realloc.c

  • Committer: Monty Taylor
  • Date: 2008-08-04 19:37:18 UTC
  • mto: (261.2.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 262.
  • Revision ID: monty@inaugust.com-20080804193718-f0rz13uli4429ozb
Changed gettext_noop() to N_()

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include <stdlib.h>
17
16
#include "mysys_priv.h"
18
17
#include "mysys_err.h"
19
18
 
40
39
  if (!(point = malloc(size)))
41
40
  {
42
41
    if (my_flags & MY_FREE_ON_ERROR)
43
 
      free(oldpoint);
 
42
      my_free(oldpoint,my_flags);
44
43
    if (my_flags & MY_HOLD_ON_ERROR)
45
44
      return(oldpoint);
46
45
    my_errno=errno;
53
52
    free(oldpoint);
54
53
  }
55
54
#else
56
 
  if ((point= (unsigned char*) realloc(oldpoint,size)) == NULL)
 
55
  if ((point= (uchar*) realloc(oldpoint,size)) == NULL)
57
56
  {
58
57
    if (my_flags & MY_FREE_ON_ERROR)
59
 
      free(oldpoint);
 
58
      my_free(oldpoint, my_flags);
60
59
    if (my_flags & MY_HOLD_ON_ERROR)
61
60
      return(oldpoint);
62
61
    my_errno=errno;