[PATCH] Use get_o2 instead of local version

Anton Lundin glance at acc.umu.se
Tue May 13 15:32:46 PDT 2014


Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 divelist.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/divelist.c b/divelist.c
index b199710..4724e72 100644
--- a/divelist.c
+++ b/divelist.c
@@ -154,12 +154,9 @@ int total_weight(struct dive *dive)
 
 static int active_o2(struct dive *dive, struct divecomputer *dc, duration_t time)
 {
-	int o2permille = dive->cylinder[0].gasmix.o2.permille;
+	int o2permille = get_o2(&dive->cylinder[0].gasmix);
 	struct event *event;
 
-	if (!o2permille)
-		o2permille = O2_IN_AIR;
-
 	for (event = dc->events; event; event = event->next) {
 		if (event->time.seconds > time.seconds)
 			break;
-- 
1.9.1



More information about the subsurface mailing list