summaryrefslogtreecommitdiffstats
path: root/divesite.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-29 12:58:16 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-29 12:58:16 -0400
commitedac07554c50a693389e4d88a6d6f56820c940f1 (patch)
tree4926b2f0b2e846690f1270265d60f61856d9bffc /divesite.h
parent7ad1485c398b8bea651e28acb5eed2c78ff8a18e (diff)
downloadsubsurface-edac07554c50a693389e4d88a6d6f56820c940f1.tar.gz
Make sure we don't create multiple dive sites with the same uuid
This shouldn't happen, but in case there is a logic error higher up in the code somewhere, this will prevent it from happening, period. If the code asks for a new dive site with a specific uuid, simply return the existing dive site with that uuid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesite.h')
-rw-r--r--divesite.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/divesite.h b/divesite.h
index 345b50448..d8987075b 100644
--- a/divesite.h
+++ b/divesite.h
@@ -50,7 +50,7 @@ static inline struct dive_site *get_dive_site_by_uuid(uint32_t uuid)
}
void dive_site_table_sort();
-struct dive_site *alloc_dive_site(uint32_t uuid);
+struct dive_site *alloc_or_get_dive_site(uint32_t uuid);
int nr_of_dives_at_dive_site(uint32_t uuid, bool select_only);
bool is_dive_site_used(uint32_t uuid, bool select_only);
void delete_dive_site(uint32_t id);