oem-ibm: drop redundant c_str() in CertHandler I/O calls Remove redundant c_str() calls when passing file paths to transferFileData() and readFile() in CertHandler. The stlcstrParam warning reports unnecessary conversions of std::string objects to C-style strings when the called functions already accept std::string-compatible parameters. Removing the explicit c_str() calls improves readability and follows modern C++ practices. Modified two call sites in oem/ibm/libpldmresponder/file_io_type_cert.cpp: - transferFileData(filePath.c_str(), ...) -> transferFileData(filePath, ...) - readFile(filePath.c_str(), ...) -> readFile(filePath, ...) No functional change intended. Change-Id: I04236f19b79fe45d8a5d8110dfdea06d876b33d0 Signed-off-by: Meghana Vangapandu <meghanav@ami.com>
diff --git a/oem/ibm/libpldmresponder/file_io_type_cert.cpp b/oem/ibm/libpldmresponder/file_io_type_cert.cpp index fef17c4..c975276 100644 --- a/oem/ibm/libpldmresponder/file_io_type_cert.cpp +++ b/oem/ibm/libpldmresponder/file_io_type_cert.cpp
@@ -62,7 +62,7 @@ { return PLDM_ERROR_INVALID_DATA; } - auto rc = transferFileData(filePath.c_str(), true, offset, length, address); + auto rc = transferFileData(filePath, true, offset, length, address); fs::remove(filePath); if (rc) { @@ -83,7 +83,7 @@ { return PLDM_ERROR_INVALID_DATA; } - auto rc = readFile(filePath.c_str(), offset, length, response); + auto rc = readFile(filePath, offset, length, response); fs::remove(filePath); if (rc) {