summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-17 17:19:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-17 08:28:21 -0700
commit950638ec1c560083cbf7c49fc0a5e6139560cc85 (patch)
treea98979ed5a7b8386db6c939ae8f3d5a75c8432ef /dive.c
parent810880ea1d435e273d2f9b7c2292f3eb6134b1f1 (diff)
downloadsubsurface-950638ec1c560083cbf7c49fc0a5e6139560cc85.tar.gz
Replace cylinder_is_used with is_cylinder_used
is_cylinder_used uses get_cylinder_index as underlaying function that does the right thing with with respect on how to find the closest matching cylinder, and handles both types of gaschange events correctly. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dive.c b/dive.c
index b39634d5e..acab8ff52 100644
--- a/dive.c
+++ b/dive.c
@@ -448,7 +448,7 @@ void copy_cylinders(struct dive *s, struct dive *d, bool used_only)
if (!s || !d)
return;
for (i = 0; i < MAX_CYLINDERS; i++)
- if (!used_only || cylinder_is_used(s, &s->cylinder[i]))
+ if (!used_only || is_cylinder_used(s, i))
d->cylinder[i] = s->cylinder[i];
else
memset(&d->cylinder[i], 0, sizeof(cylinder_t));