diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-24 09:05:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-24 10:37:02 -0500 |
commit | 364794845cbc49e638b83d7ef739524291e1e961 (patch) | |
tree | e720975b26d307d6566afb9305c9f6e44290a7da /tools/perf/builtin-top.c | |
parent | b32d133aec5dc882cf783a293f393bfb3f4379e1 (diff) |
perf tools: Introduce zalloc() for the common calloc(1, N) case
This way we type less characters and it looks more like the
kzalloc kernel counterpart.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1259071517-3242-3-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index a21247543fc1..4c8653a86aaf 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -181,7 +181,7 @@ static void parse_source(struct sym_entry *syme) | |||
181 | return; | 181 | return; |
182 | 182 | ||
183 | if (syme->src == NULL) { | 183 | if (syme->src == NULL) { |
184 | syme->src = calloc(1, sizeof(*source)); | 184 | syme->src = zalloc(sizeof(*source)); |
185 | if (syme->src == NULL) | 185 | if (syme->src == NULL) |
186 | return; | 186 | return; |
187 | pthread_mutex_init(&syme->src->lock, NULL); | 187 | pthread_mutex_init(&syme->src->lock, NULL); |