summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/profile.c b/profile.c
index 070902a06..44373e7a2 100644
--- a/profile.c
+++ b/profile.c
@@ -1474,9 +1474,8 @@ static int count_gas_change_events(struct divecomputer *dc)
return count;
}
-static void calculate_max_limits(struct dive *dive, struct graphics_context *gc)
+static void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc)
{
- struct divecomputer *dc;
struct plot_info *pi;
int maxdepth = 0;
int maxtime = 0;
@@ -1500,7 +1499,6 @@ static void calculate_max_limits(struct dive *dive, struct graphics_context *gc)
}
/* Then do all the samples from all the dive computers */
- dc = &dive->dc;
do {
int i = dc->samples;
int lastdepth = 0;
@@ -1908,7 +1906,7 @@ void plot(struct graphics_context *gc, struct dive *dive, scale_mode_t scale)
* Set up limits that are independent of
* the dive computer
*/
- calculate_max_limits(dive, gc);
+ calculate_max_limits(dive, dc, gc);
/* shift the drawing area so we have a nice margin around it */
cairo_translate(gc->cr, drawing_area->x, drawing_area->y);