aboutsummaryrefslogtreecommitdiffstats
path: root/core/planner.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-06 19:00:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-10 02:37:03 +0900
commitcef30619d0d7296e1730d87dae1c9712ac5cd822 (patch)
tree655e9c94f0272b38480b6fc6e5734388c5bc9408 /core/planner.c
parent4e419f74456bc3ac04e8d8c7550153434e36f475 (diff)
downloadsubsurface-cef30619d0d7296e1730d87dae1c9712ac5cd822.tar.gz
code cleanup: introduce empty_cylinder constant
This deals with the issue of initializing structs in C++. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/planner.c')
-rw-r--r--core/planner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c
index 51453e1ee..0e26a9a57 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -1103,7 +1103,7 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
if (prefs.surface_segment != 0) {
// Switch to an empty air cylinder for breathing air at the surface
// If no empty cylinder is found, keep using last deco gas
- cylinder_t cyl = { 0 };
+ cylinder_t cyl = empty_cylinder;
cyl.cylinder_use = NOT_USED;
add_to_cylinder_table(&dive->cylinders, dive->cylinders.nr, cyl);
current_cylinder = dive->cylinders.nr - 1;