From 8549f24c915b05e0e84e73d3d99e7888d3c7c063 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 10 Oct 2020 21:41:36 +0200 Subject: 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 --- core/dive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/dive.c') diff --git a/core/dive.c b/core/dive.c index 0658d73bc..065000970 100644 --- a/core/dive.c +++ b/core/dive.c @@ -1595,7 +1595,7 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc) { /* Add device information to table */ if (dc->deviceid && (dc->serial || dc->fw_version)) - create_device_node(dc->model, dc->deviceid, dc->serial, dc->fw_version, ""); + create_device_node(&device_table, dc->model, dc->deviceid, dc->serial, dc->fw_version, ""); /* Fixup duration and mean depth */ fixup_dc_duration(dc); -- cgit v1.2.3-70-g09d2