perf tools: remove xstrndup, xmalloc, xzalloc
All the functions that call this can handle the equivalent, non panic'ing wrapped routines. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@ -179,16 +179,8 @@ static inline char *gitstrchrnul(const char *s, int c)
|
||||
* Wrappers:
|
||||
*/
|
||||
extern char *xstrdup(const char *str);
|
||||
extern void *xmalloc(size_t size) __attribute__((weak));
|
||||
extern char *xstrndup(const char *str, size_t len);
|
||||
extern void *xrealloc(void *ptr, size_t size) __attribute__((weak));
|
||||
|
||||
static inline void *xzalloc(size_t size)
|
||||
{
|
||||
void *buf = xmalloc(size);
|
||||
|
||||
return memset(buf, 0, size);
|
||||
}
|
||||
|
||||
static inline void *zalloc(size_t size)
|
||||
{
|
||||
|
Reference in New Issue
Block a user