Re: [PATCH v3 01/11] libperf evlist: Avoid a use of evsel idx

From: John Garry
Date: Wed Mar 08 2023 - 07:25:42 EST


On 08/03/2023 08:17, Ian Rogers wrote:
Setting the leader iterates the list, so rather than use idx (which
may be changed through list reordering) just count the elements and
set afterwards.

Signed-off-by: Ian Rogers<irogers@xxxxxxxxxx>

Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>