From 3dbc5bfeaa554f519da0bed0abddddb17da26f20 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Sat, 12 Jul 2014 00:25:21 +0200 Subject: planner: Correct pO2 comparison Don't compare pO2 with a bool, compare it with the result of the ?: expression instead. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'planner.c') diff --git a/planner.c b/planner.c index 462030177..630a554fc 100644 --- a/planner.c +++ b/planner.c @@ -674,7 +674,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool if (dp->time != 0) { int pO2 = depth_to_atm(dp->depth, dive) * get_o2(&dp->gasmix); - if (pO2 > dp->entered ? prefs.bottompo2 : prefs.decopo2) { + if (pO2 > (dp->entered ? prefs.bottompo2 : prefs.decopo2)) { const char *depth_unit; int decimals; double depth_value = get_depth_units(dp->depth, &decimals, &depth_unit); -- cgit v1.2.3-70-g09d2