From 56395b38946d4b7de9e485098e928e8e432ef920 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 29 May 2014 13:13:11 -0700 Subject: Don't assume that pressures are always positive When planning a dive, the dive could use more gas than is in the cylinder. So getting a negative end pressure is a useful indication to the user that there plan might not be a good one. Signed-off-by: Dirk Hohndel --- dive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dive.c') diff --git a/dive.c b/dive.c index ae07d151a..0d8f48754 100644 --- a/dive.c +++ b/dive.c @@ -76,7 +76,7 @@ void remove_event(struct event* event) } } -int get_pressure_units(unsigned int mb, const char **units) +int get_pressure_units(int mb, const char **units) { int pressure; const char *unit; @@ -454,7 +454,7 @@ void per_cylinder_mean_depth(struct dive *dive, struct divecomputer *dc, int *me static void fixup_pressure(struct dive *dive, struct sample *sample) { - unsigned int pressure, index; + int pressure, index; cylinder_t *cyl; pressure = sample->cylinderpressure.mbar; -- cgit v1.2.3-70-g09d2