source:
lib/realloc.c
@
756b8f9
Last change on this file since 756b8f9 was e5c2bc4, checked in by Perry Lorier <perry@…>, 16 years ago | |
---|---|
|
|
File size: 300 bytes |
Rev | Line | |
---|---|---|
[e5c2bc4] | 1 | #ifdef HAVE_CONFIG_H |
[db06c9d] | 2 | # include <config.h> |
3 | #endif | |
4 | #undef realloc | |
5 | ||
6 | #include <sys/types.h> | |
[8afe034] | 7 | #include <stdlib.h> |
[db06c9d] | 8 | |
9 | void *realloc (); | |
10 | ||
11 | ||
12 | /* If N is zero, allocate a 1-byte block */ | |
13 | void * | |
14 | rpl_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.