summaryrefslogtreecommitdiff
path: root/tools/perf/util/ordered-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/ordered-events.c')
-rw-r--r--tools/perf/util/ordered-events.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 95f8211ccdde..be6a48ce3eea 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -96,8 +96,7 @@ ordered_events__new(struct ordered_events *oe, u64 timestamp)
void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event)
{
- list_del(&event->list);
- list_add(&event->list, &oe->cache);
+ list_move(&event->list, &oe->cache);
oe->nr_events--;
}