From 90ea46ff31d924e90401d0300260a67a83d417a7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 6 Aug 2019 11:25:15 +0200 Subject: Planner: fix comment for create_dive_from_plan() The function comment talks about overwriting displayed_dive, when in reality the function overwrites a passed in dive. Also fix a debug-call which dumped the displayed_dive, not the actual dive to stdout. Signed-off-by: Berthold Stoeger --- core/planner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/planner.c b/core/planner.c index 9cf4fc6ec..deacab6f5 100644 --- a/core/planner.c +++ b/core/planner.c @@ -233,7 +233,7 @@ static void update_cylinder_pressure(struct dive *d, int old_depth, int new_dept } } -/* simply overwrite the data in the displayed_dive +/* overwrite the data in dive * return false if something goes wrong */ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive, bool track_gas) { @@ -256,7 +256,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive, #endif dive->salinity = diveplan->salinity; // reset the cylinders and clear out the samples and events of the - // displayed dive so we can restart + // dive-to-be-planned so we can restart reset_cylinders(dive, track_gas); dc = &dive->dc; dc->when = dive->when = diveplan->when; @@ -343,7 +343,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive, dive->dc.last_manual_time.seconds = last_manual_point; #if DEBUG_PLAN & 32 - save_dive(stdout, &displayed_dive); + save_dive(stdout, dive); #endif return; } -- cgit v1.2.3-70-g09d2