summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-03-28 10:06:43 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-28 13:47:31 -0700
commit1b05d28944ef72a62e788efdac2dcdc2dc4771ef (patch)
treed5370ac643f1087d9d794a43485658dc2f848574 /profile.c
parent99070c49e2ed1834c7371ce7500d78895e85e67c (diff)
downloadsubsurface-1b05d28944ef72a62e788efdac2dcdc2dc4771ef.tar.gz
Use the new get_o2()/get_he() helper functions more widely
They do the "02=0 means air" thing autmatically, and make for less typing. So use them more widely in places that looked up the o2 and he permille values of a gasmix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/profile.c b/profile.c
index 6be4b13ef..59c6485a9 100644
--- a/profile.c
+++ b/profile.c
@@ -1877,8 +1877,8 @@ static void calculate_deco_information(struct dive *dive, struct divecomputer *d
int cylinderindex = entry->cylinderindex;
amb_pressure = depth_to_mbar(entry->depth, dive) / 1000.0;
- fo2 = dive->cylinder[cylinderindex].gasmix.o2.permille ? : O2_IN_AIR;
- fhe = dive->cylinder[cylinderindex].gasmix.he.permille;
+ fo2 = get_o2(&dive->cylinder[cylinderindex].gasmix);
+ fhe = get_he(&dive->cylinder[cylinderindex].gasmix);
double ratio = (double)fhe / (1000.0 - fo2);
if (entry->po2) {