From 1c53c9d8c369d228c0fd0314b9915d218b5f5dca Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 1 Jul 2012 22:51:44 +0200 Subject: Revise todo_delete_note_bynum() Pass an item instead of passing a list item index (analogous to commit 02c90ba53a658686bad5cb5f88c555d9eef06399). Signed-off-by: Lukas Fleischer --- src/todo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/todo.c') diff --git a/src/todo.c b/src/todo.c index 191a2ac..ae5a81e 100644 --- a/src/todo.c +++ b/src/todo.c @@ -156,14 +156,8 @@ void todo_write(struct todo *todo, FILE * f) } /* Delete a note previously attached to a todo item. */ -void todo_delete_note_bynum(unsigned num) +void todo_delete_note(struct todo *todo) { - llist_item_t *i = LLIST_NTH(&todolist, num); - - if (!i) - EXIT(_("no such todo")); - struct todo *todo = LLIST_TS_GET_DATA(i); - if (!todo->note) EXIT(_("no note attached")); erase_note(&todo->note); -- cgit v1.2.3-54-g00ecf