From 3d96642b8d550cbb153bcf8632106fbcbd0c8785 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 30 May 2024 14:40:08 +0200 Subject: [PATCH] smartrak: remove copy_string() that makes little sense Signed-off-by: Berthold Stoeger --- smtk-import/smartrak.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smtk-import/smartrak.cpp b/smtk-import/smartrak.cpp index 6566a87a2..0ac692398 100644 --- a/smtk-import/smartrak.cpp +++ b/smtk-import/smartrak.cpp @@ -819,7 +819,7 @@ static dc_descriptor_t *get_data_descriptor(int data_model, dc_family_t data_fam * DC. dc_family_t is certainly known *only* if it is Aladin/Memomouse family * otherwise it will be known after get_data_descriptor call. */ -static dc_status_t prepare_data(int data_model, char *serial, dc_family_t dc_fam, device_data_t *dev_data) +static dc_status_t prepare_data(int data_model, const char *serial, dc_family_t dc_fam, device_data_t *dev_data) { dev_data->device = NULL; dev_data->context = NULL; @@ -952,7 +952,7 @@ extern "C" void smartrak_import(const char *file, struct divelog *log) if (hdr_length > 0 && hdr_length < 20) // We have a profile but it's imported from datatrak dc_fam = DC_FAMILY_UWATEC_ALADIN; } - rc = prepare_data(dc_model, copy_string((char *)col[coln(DCNUMBER)]->bind_ptr), dc_fam, devdata); + rc = prepare_data(dc_model, (char *)col[coln(DCNUMBER)]->bind_ptr, dc_fam, devdata); smtkdive->dc.model = copy_string(devdata->model); if (rc == DC_STATUS_SUCCESS && mdb_table.get_len(coln(PROFILE))) { prf_buffer = static_cast(mdb_ole_read_full(mdb, col[coln(PROFILE)], &prf_length));