]> git.ipfire.org Git - thirdparty/lldpd.git/blob - src/malloc.c
Add "format" option.
[thirdparty/lldpd.git] / src / malloc.c
1 /* malloc replacement that can allocate 0 byte */
2
3 #undef malloc
4 #include <stdlib.h>
5 #include <sys/types.h>
6
7 /* Allocate an N-byte block of memory from the heap.
8 If N is zero, allocate a 1-byte block. */
9 void *
10 rpl_malloc(size_t n)
11 {
12 if (n == 0) n = 1;
13 return malloc (n);
14 }