diff options
author | Joseph Reynolds <jrey@us.ibm.com> | 2018-05-30 11:51:28 -0500 |
---|---|---|
committer | Joseph Reynolds <jrey@us.ibm.com> | 2018-05-31 09:33:25 -0500 |
commit | 510eb9cc13a9437f9fc4965c080be8136d5e1320 (patch) | |
tree | 5608a089b8f0a12bd8f80d607e3a4e1246734a15 /sensordatahandler.cpp | |
parent | 6706c1cc30f4f98040d6628f9f15c4513eef2d21 (diff) | |
download | phosphor-host-ipmid-510eb9cc13a9437f9fc4965c080be8136d5e1320.tar.gz phosphor-host-ipmid-510eb9cc13a9437f9fc4965c080be8136d5e1320.zip |
Use s.c_str() in log messages
Fixes issues with data passed to phosphor::logging::log(entry()).
This is part of a series of commits that resolves openbmc 2905.
Tested: static_assert only
Change-Id: I9fac771f54e4acbec97ce1360c106b6e3eb4fe9d
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
Diffstat (limited to 'sensordatahandler.cpp')
-rw-r--r-- | sensordatahandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp index 20006dc..2d4ac3a 100644 --- a/sensordatahandler.cpp +++ b/sensordatahandler.cpp @@ -44,8 +44,8 @@ ServicePath getServiceAndPath(sdbusplus::bus::bus& bus, if (mapperResponseMsg.is_method_error()) { log<level::ERR>("Mapper GetSubTree failed", - entry("PATH=%s", path), - entry("INTERFACE=%s", interface)); + entry("PATH=%s", path.c_str()), + entry("INTERFACE=%s", interface.c_str())); elog<InternalFailure>(); } @@ -54,8 +54,8 @@ ServicePath getServiceAndPath(sdbusplus::bus::bus& bus, if (mapperResponse.empty()) { log<level::ERR>("Invalid mapper response", - entry("PATH=%s", path), - entry("INTERFACE=%s", interface)); + entry("PATH=%s", path.c_str()), + entry("INTERFACE=%s", interface.c_str())); elog<InternalFailure>(); } @@ -69,8 +69,8 @@ ServicePath getServiceAndPath(sdbusplus::bus::bus& bus, if (iter == mapperResponse.end()) { log<level::ERR>("Couldn't find D-Bus path", - entry("PATH=%s", path), - entry("INTERFACE=%s", interface)); + entry("PATH=%s", path.c_str()), + entry("INTERFACE=%s", interface.c_str())); elog<InternalFailure>(); } return std::make_pair(iter->first, iter->second.begin()->first); |