Previously, the given argument is a string type but the required type of the argument is char *.
So, call c_str() for converting it.
This patch fixes coverity issues (cid: 1097977, 1099764).
Change-Id: I0f6595e629088b1d08d679cf718836c65947557d
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
auto phdr = AUXVval(auxv_data, AT_PHDR);
if (phdr == 0) {
- logger.log_info("PHDR not found for %s", exe_path);
+ logger.log_info("PHDR not found for %s", exe_path.c_str());
return;
}
for (const auto &pid : m_tpids) {
if (ptrace(PTRACE_DETACH, pid, nullptr, nullptr) == -1) {
logger.log_error("Detach from PID %d error: %s",
- pid, std::system_category().default_error_condition(errno).message());
+ pid, std::system_category().default_error_condition(errno).message().c_str());
}
}
}