diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-04 21:40:45 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 7081674b672b23b6c22feb4bae94cb3febf3fe1c (patch) | |
tree | 7e5dbf7c9d2b2e0d57050157ef45ebed1bfba8c6 /core/dive.c | |
parent | 0bd821183d715f709d378e8ac1a75aa0c3d0f2cc (diff) | |
download | subsurface-7081674b672b23b6c22feb4bae94cb3febf3fe1c.tar.gz |
cleanup: remove remove_event() function
No user left.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/core/dive.c b/core/dive.c index 849425389..411607926 100644 --- a/core/dive.c +++ b/core/dive.c @@ -267,24 +267,6 @@ void remove_event_from_dc(struct divecomputer *dc, struct event *event) } } -/* Remove an event from current dive computer that is identical to the passed in event. - * Frees the event. */ -void remove_event(const struct event *event) -{ - struct event **ep = ¤t_dc->events; - while (ep && !same_event(*ep, event)) - ep = &(*ep)->next; - if (ep) { - /* we can't link directly with event->next - * because 'event' can be a copy from another - * dive (for instance the displayed_dive - * that we use on the interface to show things). */ - struct event *temp = (*ep)->next; - free(*ep); - *ep = temp; - } -} - /* since the name is an array as part of the structure (how silly is that?) we * have to actually remove the existing event and replace it with a new one. * WARNING, WARNING... this may end up freeing event in case that event is indeed |