ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/ealloc.c
(Generate patch)

Comparing ray/src/meta/ealloc.c (file contents):
Revision 1.1 by greg, Sat Feb 22 02:07:26 2003 UTC vs.
Revision 1.2 by greg, Wed Apr 23 00:52:34 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8  
9   #include  <stdio.h>
10 + #include  <stdlib.h>
11  
12  
12 char  *malloc(), *realloc(), *emalloc(), *ecalloc(), *erealloc();
13  
14
14   char *
15   emalloc(n)                      /* return pointer to n uninitialized bytes */
16   unsigned  n;
# Line 65 | Line 64 | unsigned  n;
64          if (cp == NULL)
65                  cp = malloc(n);
66          else
67 <                cp = realloc(cp, n);
67 >                cp = realloc((void *)cp, n);
68  
69          if (cp != NULL)
70                  return(cp);
# Line 78 | Line 77 | unsigned  n;
77   efree(cp)                       /* free memory allocated by above */
78   char  *cp;
79   {
80 <        free(cp);
80 >        free((void *)cp);
81   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines