summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorManojkiran Eda <manojkiran.eda@gmail.com>2020-05-28 06:27:36 +0300
committerManojKiran Eda <manojkiran.eda@gmail.com>2020-05-29 07:27:35 +0300
commit2056b6d167a3ecb3c1615d906624a91259dc6c1f (patch)
treef4e7ebf65ef7f97b832ffbc69f5b27f0a021ae9d /redfish-core
parente7d68c386fbaae4e4c9cdefc2f7648a0608e38c0 (diff)
downloadbmcweb-2056b6d167a3ecb3c1615d906624a91259dc6c1f.tar.xz
BMCWeb : Fix a warning spotted in meson scan build
- This commit fixes a warning that is spotted in meson scan build which is run as a part of CI. ``` ../../../redfish-core/include/../lib/log_services.hpp:1519:9: warning: Value stored to 'ret' is never read ret = sd_journal_seek_realtime_usec(journal.get(), ts); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. ``` Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I6800ef9d908494d8328ab8e66c12778df394023c
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/log_services.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index df6e210f03..2284e23537 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1517,6 +1517,13 @@ class BMCJournalLogEntry : public Node
std::string idStr;
bool firstEntry = true;
ret = sd_journal_seek_realtime_usec(journal.get(), ts);
+ if (ret < 0)
+ {
+ BMCWEB_LOG_ERROR << "failed to seek to an entry in journal"
+ << strerror(-ret);
+ messages::internalError(asyncResp->res);
+ return;
+ }
for (uint64_t i = 0; i <= index; i++)
{
sd_journal_next(journal.get());