summaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-03 21:14:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-06 19:47:06 -0700
commitab14889563317b561eb22ad46d05f302cc582600 (patch)
treec12edebf14d86a77a289d5535411934ca09809d7 /core/libdivecomputer.c
parent810903bdb9db84997dc3d32bb8e934e320784a4d (diff)
downloadsubsurface-ab14889563317b561eb22ad46d05f302cc582600.tar.gz
Core: remove preexisting field from struct dive_table
Dives are now in all cases imported via distinct dive_tables. Therefore the "preexisting" marker is useless. Remove. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r--core/libdivecomputer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 5b386c032..c182d2944 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -503,7 +503,7 @@ static int find_dive(struct divecomputer *match)
{
int i;
- for (i = dive_table.preexisting - 1; i >= 0; i--) {
+ for (i = dive_table.nr - 1; i >= 0; i--) {
struct dive *old = dive_table.dives[i];
if (match_one_dive(match, old))