aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parse-events.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse-events.c b/parse-events.c
index b29a8d5..679c0c9 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -3534,7 +3534,6 @@ struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_
3534{ 3534{
3535 struct event_format **events; 3535 struct event_format **events;
3536 int (*sort)(const void *a, const void *b); 3536 int (*sort)(const void *a, const void *b);
3537 int i = 0;
3538 3537
3539 events = pevent->sort_events; 3538 events = pevent->sort_events;
3540 3539
@@ -3547,7 +3546,7 @@ struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_
3547 return NULL; 3546 return NULL;
3548 3547
3549 memcpy(events, pevent->events, sizeof(*events) * pevent->nr_events); 3548 memcpy(events, pevent->events, sizeof(*events) * pevent->nr_events);
3550 events[i] = NULL; 3549 events[pevent->nr_events] = NULL;
3551 3550
3552 pevent->sort_events = events; 3551 pevent->sort_events = events;
3553 3552