From 915bc0999676b1d42f8c9dd57e5911931cd34fcd Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 15 Mar 2014 02:23:43 +0100 Subject: [PATCH] Fix stupid typo in 470989b that triggered panics easily. Change-Id: Ic998a0ea93141a5399e28dc286eea4e3d40663d6 --- firmware/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/events.c b/firmware/events.c index 4a51e7ae87..3386c02465 100644 --- a/firmware/events.c +++ b/firmware/events.c @@ -49,7 +49,7 @@ static bool do_add_event(unsigned short id, bool oneshot, bool user_data_valid, for (i = 0; i < MAX_SYS_EVENTS; i++) { if (events[i].handler.callback == handler && events[i].id == id - && (!user_data_valid || (user_data == events[i].handler.callback))) + && (!user_data_valid || (user_data == events[i].handler.user_data))) return false; } @@ -89,7 +89,7 @@ void do_remove_event(unsigned short id, bool user_data_valid, for (i = 0; i < MAX_SYS_EVENTS; i++) { if (events[i].id == id && events[i].handler.callback == handler - && (!user_data_valid || (user_data == events[i].handler.callback))) + && (!user_data_valid || (user_data == events[i].handler.user_data))) { events[i].handler.callback = NULL; return;