uemis downloader: use move instead of copy to return string

Found by Coverity.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-08-14 09:38:37 +02:00 committed by Michael Keller
parent f78662acce
commit 1578c7be99

View file

@ -670,7 +670,7 @@ static std::string uemis_get_answer(const std::string &path, const std::string &
for (i = 0; i < n_param_out; i++)
report_info("::: %d: %s\n", i, param_buff[i].c_str());
#endif
return found_answer ? mbuf : std::string();
return found_answer ? std::move(mbuf) : std::string();
fs_error:
close(ans_file);
return std::string();