source: lib/realloc.c @ 60e8e86

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

Redo the build system for libtrace3

  • Property mode set to 100644
File size: 300 bytes
Line 
1#ifdef HAVE_CONFIG_H
2#  include <config.h>
3#endif
4#undef realloc
5
6#include <sys/types.h>
7#include <stdlib.h>
8
9void *realloc ();
10
11
12/* If N is zero, allocate a 1-byte block */
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.