diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-22 17:52:22 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-27 18:21:45 +0300 |
commit | 4bb7123dcfa7aa1d963ad4a8f01b88d54a2bb873 (patch) | |
tree | c75934a5be0224534f73ae014f3f4bb29b866f3c /tools/perf/util/map.c | |
parent | 614c6b570d5157c2cf835d334bc89af071fc2e44 (diff) | |
download | linux-4bb7123dcfa7aa1d963ad4a8f01b88d54a2bb873.tar.xz |
perf tools: Use maps__first()/map__next()
In a few more remaining places, for consistency.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-c2n7slwtto29wndfttdrhfrx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r-- | tools/perf/util/map.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index c1bfd0a12a94..898ab92a98dd 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -688,9 +688,10 @@ move_map: int map_groups__clone(struct map_groups *mg, struct map_groups *parent, enum map_type type) { - struct rb_node *nd; - for (nd = rb_first(&parent->maps[type]); nd; nd = rb_next(nd)) { - struct map *map = rb_entry(nd, struct map, rb_node); + struct map *map; + struct rb_root *maps = &parent->maps[type]; + + for (map = maps__first(maps); map; map = map__next(map)) { struct map *new = map__clone(map); if (new == NULL) return -ENOMEM; |