core: pass dc-number to update_event_name()

The dive was passed as an argument to update_event_name(), but
the divecomputer was derived from the global dc_number variable.
That makes no sense. Therefore, pass the dc_number as argument
and update the only caller (smtk-import).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-03-11 22:38:14 +01:00 committed by Dirk Hohndel
parent 0c4be83b31
commit 12406786f1
3 changed files with 3 additions and 3 deletions

View file

@ -806,7 +806,7 @@ static void smtk_parse_bookmarks(MdbHandle *mdb, struct dive *d, char *dive_idx)
tmp = strdup(bound_values[2]);
ev = find_bookmark(d->dc.events, time);
if (ev)
update_event_name(d, ev, tmp);
update_event_name(d, 0, ev, tmp);
else
if (!add_event(&d->dc, time, SAMPLE_EVENT_BOOKMARK, 0, 0, tmp))
report_error("[smtk-import] Error - Couldn't add bookmark, dive %d, Name = %s",