diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-10 09:51:25 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-10 09:51:25 -0400 |
commit | 7f8264539c62378cccbdf9b598927b034bef4a92 (patch) | |
tree | d8ffc9d666e306b78f5023b5b4ded3d6174583d8 /tools | |
parent | 1f0ac7183f4d270bd9ce511254ba5d931d4f29c9 (diff) |
perf newt: Use newtAddComponent()
Instead of newtAddComponents(just-one-entry, NULL), that is not needed
if, like in this browser, we're adding just one component at a time.
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')
-rw-r--r-- | tools/perf/util/newt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 7a123a94e3fc..e283a6e6b6e0 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -31,7 +31,7 @@ struct ui_progress *ui_progress__new(const char *title, u64 total) | |||
31 | self->scale = newtScale(0, 0, cols, total); | 31 | self->scale = newtScale(0, 0, cols, total); |
32 | if (self->scale == NULL) | 32 | if (self->scale == NULL) |
33 | goto out_free_form; | 33 | goto out_free_form; |
34 | newtFormAddComponents(self->form, self->scale, NULL); | 34 | newtFormAddComponent(self->form, self->scale); |
35 | newtRefresh(); | 35 | newtRefresh(); |
36 | } | 36 | } |
37 | 37 | ||
@@ -107,7 +107,7 @@ static int popup_menu(int argc, char * const argv[]) | |||
107 | if (listbox == NULL) | 107 | if (listbox == NULL) |
108 | goto out_destroy_form; | 108 | goto out_destroy_form; |
109 | 109 | ||
110 | newtFormAddComponents(form, listbox, NULL); | 110 | newtFormAddComponent(form, listbox); |
111 | 111 | ||
112 | for (i = 0; i < argc; ++i) { | 112 | for (i = 0; i < argc; ++i) { |
113 | int len = strlen(argv[i]); | 113 | int len = strlen(argv[i]); |
@@ -365,7 +365,7 @@ static void map_symbol__annotate_browser(const struct map_symbol *self, | |||
365 | 365 | ||
366 | newtCenteredWindow(max_line_len + 2, rows - 5, self->sym->name); | 366 | newtCenteredWindow(max_line_len + 2, rows - 5, self->sym->name); |
367 | form = newt_form__new(); | 367 | form = newt_form__new(); |
368 | newtFormAddComponents(form, tree, NULL); | 368 | newtFormAddComponent(form, tree); |
369 | 369 | ||
370 | newtFormRun(form, &es); | 370 | newtFormRun(form, &es); |
371 | newtFormDestroy(form); | 371 | newtFormDestroy(form); |