source: lib/realloc.c @ abc8e94

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since abc8e94 was 68155f1, checked in by Perry Lorier <perry@…>, 15 years ago

Libtrace does not need getopt!

  • Property mode set to 100644
File size: 277 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 */
12void *
13rpl_realloc(void *ptr,size_t n)
14{
15       
16        if (n == 0)
17                n = 1;
18        if (ptr == 0)
19                return malloc(n);
20        return realloc(ptr,n);
21}
Note: See TracBrowser for help on using the repository browser.