Upload Tizen:Base source
[framework/base/util-linux-ng.git] / mount / xmalloc.h
1 #ifndef MOUNT_XMALLOC_H
2 #define MOUNT_XMALLOC_H
3
4 extern void *xmalloc(size_t size);
5 extern void *xrealloc(void *p, size_t size);
6 extern char *xstrdup(const char *s);
7
8 /*
9  * free(p); when 'p' is 'const char *' makes gcc unhappy:
10  *    warning: passing argument 1 of ‘free’ discards qualifiers from pointer target type
11  */
12 #define my_free(_p)     free((void *) _p)
13
14 #endif  /* MOUNT_XMALLOC_H */