diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-02-16 20:13:07 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-16 20:13:07 -0500 |
commit | 69d7fc3623a25726177aa8ce224a94457e03578e (patch) | |
tree | 1bf569c976ab48124b95010a2e1bd302662224fe | |
parent | cbef4c9225ad7c250207a151a97fb12abf34b18e (diff) |
parse-events: Fix init of event list in pevent
The initialization of the event list zero'd the first event item
instead of the last.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | parse-events.c | 3 |
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 | ||