From 80e24954c20453a83c57a979f84c74c6adffee62 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 25 Jun 2012 12:04:45 +0200 Subject: Simplify recur_apoint_switch_notify() Pass the recurrent appointment itself instead of passing a date and an item number. This is quite simple as we can just pass the pointer that is contained in the generic item structure and don't have to LLIST_TS_FIND_*() the item first any more. Signed-off-by: Lukas Fleischer --- src/recur.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/recur.c') diff --git a/src/recur.c b/src/recur.c index 785f4dd..5eb6de6 100644 --- a/src/recur.c +++ b/src/recur.c @@ -1005,19 +1005,11 @@ struct recur_event *recur_get_event(long date, int num) } /* Switch recurrent item notification state. */ -void recur_apoint_switch_notify(long date, int recur_nb) +void recur_apoint_switch_notify(struct recur_apoint *rapt) { - llist_item_t *i; - LLIST_TS_LOCK(&recur_alist_p); - i = LLIST_TS_FIND_NTH(&recur_alist_p, recur_nb, date, recur_apoint_inday); - - if (!i) - EXIT(_("item not found")); - struct recur_apoint *rapt = LLIST_TS_GET_DATA(i); rapt->state ^= APOINT_NOTIFY; - if (notify_bar()) notify_check_repeated(rapt); -- cgit v1.2.3-54-g00ecf