summaryrefslogtreecommitdiffstats
path: root/core/load-git.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-10 21:41:36 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-16 14:26:37 -0700
commit8549f24c915b05e0e84e73d3d99e7888d3c7c063 (patch)
treeb5696fb7675b448b9f812af79a8492d4ace318b4 /core/load-git.c
parent7b06349be55935be9a09310a5c0bba50e4585d35 (diff)
downloadsubsurface-8549f24c915b05e0e84e73d3d99e7888d3c7c063.tar.gz
core: add device_table parameter to device table functions
Instead of accessing the global device table directly, add a parameter to all device-table accessing functions. This makes all places in the code that access the global device table grep-able, which is necessary to include the device-table code in the undo system. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/load-git.c')
-rw-r--r--core/load-git.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/load-git.c b/core/load-git.c
index 0cf18d48c..915db26e2 100644
--- a/core/load-git.c
+++ b/core/load-git.c
@@ -712,7 +712,7 @@ static void parse_dc_date(char *line, struct membuffer *str, struct git_parser_s
{ UNUSED(str); update_date(&state->active_dc->when, line); }
static void parse_dc_deviceid(char *line, struct membuffer *str, struct git_parser_state *state)
-{ UNUSED(str); set_dc_deviceid(state->active_dc, get_hex(line)); }
+{ UNUSED(str); set_dc_deviceid(state->active_dc, get_hex(line), &device_table); }
static void parse_dc_diveid(char *line, struct membuffer *str, struct git_parser_state *state)
{ UNUSED(str); state->active_dc->diveid = get_hex(line); }
@@ -1000,7 +1000,7 @@ static void parse_settings_divecomputerid(char *line, struct membuffer *str, str
break;
line = parse_keyvalue_entry(parse_divecomputerid_keyvalue, &id, line, str);
}
- create_device_node(id.model, id.deviceid, id.serial, id.firmware, id.nickname);
+ create_device_node(&device_table, id.model, id.deviceid, id.serial, id.firmware, id.nickname);
}
static void parse_picture_filename(char *line, struct membuffer *str, struct git_parser_state *state)