From 92abfb4b90253e4fd1f2030cebf12522e0c0580f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 14 Aug 2024 09:40:55 +0200 Subject: [PATCH] ostctools: avoid string copy Found by Coverity. Signed-off-by: Berthold Stoeger --- core/ostctools.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/ostctools.cpp b/core/ostctools.cpp index a288d9a8d..6af6bb121 100644 --- a/core/ostctools.cpp +++ b/core/ostctools.cpp @@ -150,8 +150,7 @@ void ostctools_import(const char *file, struct divelog *log) report_error(translate("gettextFromC", "Unknown DC in dive %d"), ostcdive->number); return; } - std::string tmp = devdata.vendor + " " + devdata.model + " (Imported from OSTCTools)"; - ostcdive->dcs[0].model = tmp; + ostcdive->dcs[0].model = devdata.vendor + " " + devdata.model + " (Imported from OSTCTools)"; // Parse the dive data rc = libdc_buffer_parser(ostcdive.get(), &devdata, buffer.data(), i + 1);