summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-12 00:25:21 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-11 16:58:24 -0700
commit3dbc5bfeaa554f519da0bed0abddddb17da26f20 (patch)
tree2a4bca21d7eecd688df70a8e3be411231bbc3bbd /planner.c
parent44a554d53a5d1167bd79e54f8b752154a3b2877a (diff)
downloadsubsurface-3dbc5bfeaa554f519da0bed0abddddb17da26f20.tar.gz
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 <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c2
1 files changed, 1 insertions, 1 deletions
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);