summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r--tools/perf/util/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index e1c623e0c99e..30c5517f2f91 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -302,6 +302,11 @@ extern int xdup(int fd);
extern FILE *xfdopen(int fd, const char *mode);
extern int xmkstemp(char *template);
+static inline void *zalloc(size_t size)
+{
+ return calloc(1, size);
+}
+
static inline size_t xsize_t(off_t len)
{
return (size_t)len;