From 1578c7be9908d419c119febc4b30319f4dc8d676 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 14 Aug 2024 09:38:37 +0200 Subject: [PATCH] uemis downloader: use move instead of copy to return string Found by Coverity. Signed-off-by: Berthold Stoeger --- core/uemis-downloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/uemis-downloader.cpp b/core/uemis-downloader.cpp index b2cbcf272..011a41dd5 100644 --- a/core/uemis-downloader.cpp +++ b/core/uemis-downloader.cpp @@ -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();