Remove base from journal calls
Base from the journal helper function. This is only ever used for
base10, and is only used in one spot. There's no need need to have this
as an argument. Just use defaults.
Tested: Redfish service validator passes.
Journal entries at /redfish/v1/Managers/LogService/Journal/Entries
look correct
Change-Id: I427ddde1c1fc89cb8116fd9cb30b8fd799ba58b5
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/lib/manager_logservices_journal.hpp b/redfish-core/lib/manager_logservices_journal.hpp
index acab53c..0a90390 100644
--- a/redfish-core/lib/manager_logservices_journal.hpp
+++ b/redfish-core/lib/manager_logservices_journal.hpp
@@ -42,7 +42,7 @@
}
inline int getJournalMetadataInt(sd_journal* journal, const char* field,
- const int base, long int& contents)
+ long int& contents)
{
std::string_view metadata;
// Get the metadata from the requested field of the journal entry
@@ -52,7 +52,7 @@
return ret;
}
std::from_chars_result res =
- std::from_chars(&*metadata.begin(), &*metadata.end(), contents, base);
+ std::from_chars(&*metadata.begin(), &*metadata.end(), contents);
if (res.ec != std::error_code{} || res.ptr != &*metadata.end())
{
return -1;
@@ -110,7 +110,7 @@
// Get the severity from the PRIORITY field
long int severity = 8; // Default to an invalid priority
- ret = getJournalMetadataInt(journal, "PRIORITY", 10, severity);
+ ret = getJournalMetadataInt(journal, "PRIORITY", severity);
if (ret < 0)
{
BMCWEB_LOG_DEBUG("Failed to read PRIORITY field: {}", ret);