/[monit]/monit/xmalloc.c
ViewVC logotype

Diff of /monit/xmalloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by hauk, Thu Jun 26 14:24:11 2003 UTC revision 1.8 by chopp, Wed Aug 13 22:18:43 2003 UTC
# Line 19  Line 19 
19    
20  #include <config.h>  #include <config.h>
21    
22    #ifdef HAVE_STRING_H
23  #include <string.h>  #include <string.h>
24    #endif
25    
26    #ifdef HAVE_STDLIB_H
27  #include <stdlib.h>  #include <stdlib.h>
28    #endif
29    
30    #ifdef HAVE_ERRNO_H
31  #include <errno.h>  #include <errno.h>
32    #endif
33    
34  #ifdef HAVE_STRING_H  #ifdef HAVE_STRING_H
35  #include <string.h>  #include <string.h>
# Line 129  void *xresize(void *p, long nbytes) { Line 137  void *xresize(void *p, long nbytes) {
137        
138  }  }
139    
140    
141    #if ! HAVE_MALLOC
142    #undef malloc
143    
144    void *malloc (size_t);
145    
146    void *rpl_malloc (size_t __size)
147    {  
148      if (__size == 0) {
149        __size++;
150      }
151      return malloc(__size);
152    }
153    #endif

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26