mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
0c4be83b31
commit
12406786f1
3 changed files with 3 additions and 3 deletions
|
@ -123,7 +123,7 @@ void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int second
|
|||
* have to actually remove the existing event and replace it with a new one.
|
||||
* WARNING, WARNING... this may end up freeing event in case that event is indeed
|
||||
* WARNING, WARNING... part of this divecomputer on this dive! */
|
||||
void update_event_name(struct dive *d, struct event *event, const char *name)
|
||||
void update_event_name(struct dive *d, int dc_number, struct event *event, const char *name)
|
||||
{
|
||||
if (!d || !event)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue