Simplify the bailout detection functions.

Function peek_next_divemodechange() is redundant if get_next_divemodechange()
has one additional parameter. Calls to get_next_divemodechange() were
updated in divelist.c, plannernotes.c and profile.c.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
Willem Ferguson 2018-04-05 14:13:34 +02:00 committed by Lubomir I. Ivanov
parent c1d04ef7dc
commit 0e08c0870a
5 changed files with 17 additions and 46 deletions

View file

@ -415,7 +415,7 @@ static void add_dive_to_deco(struct deco_state *ds, struct dive *dive)
struct divecomputer *dc = &dive->dc;
struct gasmix *gasmix = NULL;
struct event *ev = NULL;
struct event *ev_dmc = dc->events, *ev_dmt = get_next_divemodechange(&ev_dmc);
struct event *ev_dmc = dc->events, *ev_dmt = get_next_divemodechange(&ev_dmc, TRUE);
int i;
if (!dc)