blob: 2fc0a7e55fd987d4d378e7f15ad272b7f67ead91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#ifndef MOUNT_XMALLOC_H
#define MOUNT_XMALLOC_H
extern void *xmalloc(size_t size);
extern void *xrealloc(void *p, size_t size);
extern char *xstrdup(const char *s);
/*
* free(p); when 'p' is 'const char *' makes gcc unhappy:
* warning: passing argument 1 of ‘free’ discards qualifiers from pointer target type
*/
#define my_free(_p) free((void *) _p)
#endif /* MOUNT_XMALLOC_H */
|