summaryrefslogtreecommitdiffstats
path: root/core/save-git.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-23 18:55:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-29 00:09:31 +0000
commit8de471f90e95a5a75d0fec78d5bbf900eb90f235 (patch)
tree62812fb5aab9f6a8cb17db8969ab4e10eb041de0 /core/save-git.c
parent14ab95608cc0694caff580825666d2009177e0a2 (diff)
downloadsubsurface-8de471f90e95a5a75d0fec78d5bbf900eb90f235.tar.gz
Dive site: pass dive-site pointer to is_dive_site_used()
Instead of passing a uuid, pass a pointer to the dive site. This is small step in an effort to remove uuids. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-git.c')
-rw-r--r--core/save-git.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/save-git.c b/core/save-git.c
index 938b7d3a5..524c350ed 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -883,7 +883,7 @@ static void save_divesites(git_repository *repo, struct dir *tree)
for (int i = 0; i < dive_site_table.nr; i++) {
struct membuffer b = { 0 };
struct dive_site *ds = get_dive_site(i);
- if (dive_site_is_empty(ds) || !is_dive_site_used(ds->uuid, false)) {
+ if (dive_site_is_empty(ds) || !is_dive_site_used(ds, false)) {
int j;
struct dive *d;
for_each_dive(j, d) {
@@ -900,7 +900,7 @@ static void save_divesites(git_repository *repo, struct dir *tree)
// these are the two default names for sites from
// the web service; if the site isn't used in any
// dive (really? you didn't rename it?), delete it
- if (!is_dive_site_used(ds->uuid, false)) {
+ if (!is_dive_site_used(ds, false)) {
if (verbose)
fprintf(stderr, "Deleted unused auto-created dive site %s\n", ds->name);
delete_dive_site(ds->uuid);