aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-18 17:54:30 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-18 22:05:28 -0400
commit151f85a471d29fc81f70348143d009a729901bc0 (patch)
tree5860102465e3fa3cf660884d91a82d86dbfc4835 /tools/perf/util/util.h
parent8a7ddad8e756a72906851fdd5a6e149cbb056e0d (diff)
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>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r--tools/perf/util/util.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 52118a0c0bad..45b9655f3a5c 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -179,16 +179,8 @@ static inline char *gitstrchrnul(const char *s, int c)
179 * Wrappers: 179 * Wrappers:
180 */ 180 */
181extern char *xstrdup(const char *str); 181extern char *xstrdup(const char *str);
182extern void *xmalloc(size_t size) __attribute__((weak));
183extern char *xstrndup(const char *str, size_t len);
184extern void *xrealloc(void *ptr, size_t size) __attribute__((weak)); 182extern void *xrealloc(void *ptr, size_t size) __attribute__((weak));
185 183
186static inline void *xzalloc(size_t size)
187{
188 void *buf = xmalloc(size);
189
190 return memset(buf, 0, size);
191}
192 184
193static inline void *zalloc(size_t size) 185static inline void *zalloc(size_t size)
194{ 186{