aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-05 07:40:32 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-05 07:40:52 -0700
commit0a4b2464216d7e701e500b5a9f3370aab04791c5 (patch)
tree2a7f53297ef21842afd9841a54ceda5da12f83a5 /core
parent710e2150c84c50d059e84afb9f25e75fc781f125 (diff)
downloadsubsurface-0a4b2464216d7e701e500b5a9f3370aab04791c5.tar.gz
Small cleanup of helper functions to remove unused arguments
Also removes an unused variable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/dive.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/dive.c b/core/dive.c
index ecddda6b9..1b3af66f3 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -1293,7 +1293,7 @@ static void fixup_dc_cylinder_index(struct dive *dive, struct divecomputer *dc)
}
/* Remove redundant pressure information */
-static void simplify_dc_pressures(struct dive *dive, struct divecomputer *dc)
+static void simplify_dc_pressures(struct divecomputer *dc)
{
int i;
int lastindex = -1;
@@ -1380,7 +1380,7 @@ static void fixup_dive_pressures(struct dive *dive, struct divecomputer *dc)
fixup_end_pressure(dive, o2index, sample->o2cylinderpressure);
}
- simplify_dc_pressures(dive, dc);
+ simplify_dc_pressures(dc);
}
int find_best_gasmix_match(struct gasmix *mix, cylinder_t array[], unsigned int used)
@@ -1409,7 +1409,7 @@ int find_best_gasmix_match(struct gasmix *mix, cylinder_t array[], unsigned int
/*
* Match a gas change event against the cylinders we have
*/
-static bool validate_gaschange(struct dive *dive, struct divecomputer *dc, struct event *event)
+static bool validate_gaschange(struct dive *dive, struct event *event)
{
int index;
int o2, he, value;
@@ -1446,10 +1446,10 @@ static bool validate_gaschange(struct dive *dive, struct divecomputer *dc, struc
}
/* Clean up event, return true if event is ok, false if it should be dropped as bogus */
-static bool validate_event(struct dive *dive, struct divecomputer *dc, struct event *event)
+static bool validate_event(struct dive *dive, struct event *event)
{
if (event_is_gaschange(event))
- return validate_gaschange(dive, dc, event);
+ return validate_gaschange(dive, event);
return true;
}
@@ -1459,7 +1459,7 @@ static void fixup_dc_gasswitch(struct dive *dive, struct divecomputer *dc)
evp = &dc->events;
while ((event = *evp) != NULL) {
- if (validate_event(dive, dc, event)) {
+ if (validate_event(dive, event)) {
evp = &event->next;
continue;
}
@@ -1471,8 +1471,6 @@ static void fixup_dc_gasswitch(struct dive *dive, struct divecomputer *dc)
static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc)
{
- int i;
-
/* Add device information to table */
if (dc->deviceid && (dc->serial || dc->fw_version))
create_device_node(dc->model, dc->deviceid, dc->serial, dc->fw_version, "");