From ab14889563317b561eb22ad46d05f302cc582600 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 3 Oct 2018 21:14:11 +0200 Subject: 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 --- core/libdivecomputer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/libdivecomputer.c') 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)) -- cgit v1.2.3-70-g09d2