This is an automated email from the ASF dual-hosted git repository.
dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new ffb41371aa Coverity Fixes: (#11445)
ffb41371aa is described below
commit ffb41371aa65667e31a41c93799d60b6819020b0
Author: Damian Meden <[email protected]>
AuthorDate: Mon Jun 17 19:57:19 2024 +0200
Coverity Fixes: (#11445)
- 1497249 Invalid type in argument to printf format
- 1544455 COPY_INSTEAD_OF_MOVE
---
src/iocore/hostdb/HostDB.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/iocore/hostdb/HostDB.cc b/src/iocore/hostdb/HostDB.cc
index 91d93671fb..c5d593a381 100644
--- a/src/iocore/hostdb/HostDB.cc
+++ b/src/iocore/hostdb/HostDB.cc
@@ -1585,7 +1585,7 @@ UpdateHostsFile(swoc::file::path const &path, ts_seconds
interval)
// Swap the pointer
if (hf) {
std::unique_lock lock(hostDB.host_file_mutex);
- hostDB.host_file = hf;
+ hostDB.host_file = std::move(hf);
}
hostdb_hostfile_update_timestamp = hostdb_current_timestamp;
// Mark this one as completed, so we can allow another update to happen
@@ -1622,7 +1622,7 @@ struct HostDBRegressionContinuation : public Continuation
{
if (event == EVENT_HOST_DB_LOOKUP) {
--outstanding;
if (r) {
- rprintf(test, "HostDBRecord r=%x\n", r);
+ rprintf(test, "HostDBRecord r=%p\n", r);
rprintf(test, "HostDBRecord hostname=%s\n", r->name());
// If RR, print all of the enclosed records
auto rr_info{r->rr_info()};