projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
perf tools: Introduce zalloc() for the common calloc(1, N) case
[deliverable/linux.git]
/
tools
/
perf
/
util
/
util.h
diff --git
a/tools/perf/util/util.h
b/tools/perf/util/util.h
index e1c623e0c99e2ed2a5156e27edbed123cf699a70..30c5517f2f917dc74c2c704e87e362b1371d4b14 100644
(file)
--- 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;
This page took
0.02603 seconds
and
5
git commands to generate.