mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
ostctools: avoid string copy
Found by Coverity. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1578c7be99
commit
92abfb4b90
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue