aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core/dive.c
diff options
context:
space:
mode:
authorGravatar Stephen Hemminger <stephen@networkplumber.org>2015-12-27 14:33:16 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-27 21:31:13 -0800
commit7a42215067f60edbfeab179343ba0c10b47d9590 (patch)
tree304bad74a6cf1febff7d02f49d254c2fc0c96cf4 /subsurface-core/dive.c
parentfcc615a497c644357357d4b46821a48b2f7ff314 (diff)
downloadsubsurface-7a42215067f60edbfeab179343ba0c10b47d9590.tar.gz
dive: paren error in set point handling
This probably is a serious bug, found by cppcheck. Original code had paren's in probably the wrong place! Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/dive.c')
-rw-r--r--subsurface-core/dive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-core/dive.c b/subsurface-core/dive.c
index 46129b86a..f0baf076a 100644
--- a/subsurface-core/dive.c
+++ b/subsurface-core/dive.c
@@ -933,7 +933,7 @@ void update_setpoint_events(struct divecomputer *dc)
next = get_next_event(ev, "gaschange");
}
fill_pressures(&pressures, calculate_depth_to_mbar(dc->sample[i].depth.mm, dc->surface_pressure, 0), gasmix ,0, OC);
- if (abs(dc->sample[i].setpoint.mbar - (int)(1000 * pressures.o2) <= 50))
+ if (abs(dc->sample[i].setpoint.mbar - (int)(1000 * pressures.o2)) <= 50)
dc->sample[i].setpoint.mbar = 0;
}
}