Fix incorrect and confusing warning message

In verbose mode we wanted to tell the user if they had a reference to a
non-existant dive site that we removed for consistency. Except the
condition was wrong and the warning was printed for every VALID dive site
reference. Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-09-28 21:41:32 -04:00
parent b992ca22df
commit 55cc0ee9c1

View file

@ -405,7 +405,7 @@ static void create_dive_buffer(struct dive *dive, struct membuffer *b)
save_tags(b, dive->tag_list);
cond_put_format(dive->dive_site_uuid && get_dive_site_by_uuid(dive->dive_site_uuid),
b, "divesiteid %08x\n", dive->dive_site_uuid);
if (verbose && dive->dive_site_uuid && get_dive_site_by_uuid(dive->dive_site_uuid))
if (verbose && dive->dive_site_uuid && !get_dive_site_by_uuid(dive->dive_site_uuid))
fprintf(stderr, "removed reference to non-existant dive site with uuid %08x\n", dive->dive_site_uuid);
save_overview(b, dive);
save_cylinder_info(b, dive);