source: lib/realloc.c @ 7f32bb5

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 7f32bb5 was db06c9d, checked in by Daniel Lawson <dlawson@…>, 16 years ago

change way we open files to get around gzopen being broken
adding malloc and realloc substitution functions

  • Property mode set to 100644
File size: 278 bytes
Line 
1#if HAVE_CONFIG_H
2#  include <config.h>
3#endif
4#undef realloc
5
6#include <sys/types.h>
7
8void *realloc ();
9
10
11/* If N is zero, allocate a 1-byte block */
12
13void *
14rpl_realloc(void *ptr,size_t n)
15{
16       
17        if (n == 0)
18                n = 1;
19        if (ptr == 0)
20                return malloc(n);
21        return realloc(ptr,n);
22}
Note: See TracBrowser for help on using the repository browser.