summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/dive.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/dive.c b/core/dive.c
index 1fe3eccf4..345b59c2c 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -3438,7 +3438,6 @@ int count_dives_with_suit(const char *suit)
struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset, bool prefer_downloaded, struct dive_trip **trip)
{
struct dive *res = alloc_dive();
- const struct dive *dl = NULL;
const struct dive *preferred_trip;
int cylinders_map_a[MAX_CYLINDERS], cylinders_map_b[MAX_CYLINDERS];
@@ -3480,7 +3479,7 @@ struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset,
merge_temperatures(res, a, b);
if (prefer_downloaded) {
/* If we prefer downloaded, do those first, and get rid of "might be same" computers */
- join_dive_computers(res, &res->dc, &dl->dc, &a->dc, cylinders_map_b, cylinders_map_a, 1);
+ join_dive_computers(res, &res->dc, &b->dc, &a->dc, cylinders_map_b, cylinders_map_a, 1);
} else if (offset && might_be_same_device(&a->dc, &b->dc))
interleave_dive_computers(res, &res->dc, &a->dc, &b->dc, cylinders_map_a, cylinders_map_b, offset);
else