瀏覽代碼

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>
Arnaldo Carvalho de Melo 15 年之前
父節點
當前提交
7f8264539c
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      tools/perf/util/newt.c

+ 3 - 3
tools/perf/util/newt.c

@@ -31,7 +31,7 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)
 		self->scale = newtScale(0, 0, cols, total);
 		if (self->scale == NULL)
 			goto out_free_form;
-		newtFormAddComponents(self->form, self->scale, NULL);
+		newtFormAddComponent(self->form, self->scale);
 		newtRefresh();
 	}
 
@@ -107,7 +107,7 @@ static int popup_menu(int argc, char * const argv[])
 	if (listbox == NULL)
 		goto out_destroy_form;
 
-	newtFormAddComponents(form, listbox, NULL);
+	newtFormAddComponent(form, listbox);
 
 	for (i = 0; i < argc; ++i) {
 		int len = strlen(argv[i]);
@@ -365,7 +365,7 @@ static void map_symbol__annotate_browser(const struct map_symbol *self,
 
 	newtCenteredWindow(max_line_len + 2, rows - 5, self->sym->name);
 	form = newt_form__new();
-	newtFormAddComponents(form, tree, NULL);
+	newtFormAddComponent(form, tree);
 
 	newtFormRun(form, &es);
 	newtFormDestroy(form);