summaryrefslogtreecommitdiff
path: root/redfish-core/include/utils
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-01-03 00:16:50 +0300
committerEd Tanous <ed@tanous.net>2024-01-09 20:44:00 +0300
commit8ece0e457ee994e54c23ee7393fbce831d81a954 (patch)
treed673c8d7c744c2057a7250e4027e82249480c2fe /redfish-core/include/utils
parentf3cb5df94799e94df37f9e2e6c2fcc473e0cae4a (diff)
downloadbmcweb-8ece0e457ee994e54c23ee7393fbce831d81a954.tar.xz
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$") At some point in the future, we might want to get this enabled in CI. Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'redfish-core/include/utils')
-rw-r--r--redfish-core/include/utils/query_param.hpp10
-rw-r--r--redfish-core/include/utils/time_utils.hpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index 5fa4852390..55c92bca42 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -689,7 +689,7 @@ inline std::vector<ExpandNode>
// Formats a query parameter string for the sub-query.
// Returns std::nullopt on failures.
// This function shall handle $select when it is added.
-// There is no need to handle parameters that's not campatible with $expand,
+// There is no need to handle parameters that's not compatible with $expand,
// e.g., $only, since this function will only be called in side $expand handlers
inline std::optional<std::string> formatQueryForExpand(const Query& query)
{
@@ -727,7 +727,7 @@ inline std::optional<std::string> formatQueryForExpand(const Query& query)
return str;
}
-// Propogates the worst error code to the final response.
+// Propagates the worst error code to the final response.
// The order of error code is (from high to low)
// 500 Internal Server Error
// 511 Network Authentication Required
@@ -741,7 +741,7 @@ inline std::optional<std::string> formatQueryForExpand(const Query& query)
// 502 Bad Gateway
// 501 Not Implemented
// 401 Unauthorized
-// 451 - 409 Error codes (not listed explictly)
+// 451 - 409 Error codes (not listed explicitly)
// 408 Request Timeout
// 407 Proxy Authentication Required
// 406 Not Acceptable
@@ -753,7 +753,7 @@ inline std::optional<std::string> formatQueryForExpand(const Query& query)
inline unsigned propogateErrorCode(unsigned finalCode, unsigned subResponseCode)
{
// We keep a explicit list for error codes that this project often uses
- // Higer priority codes are in lower indexes
+ // Higher priority codes are in lower indexes
constexpr std::array<unsigned, 13> orderedCodes = {
500, 507, 503, 502, 501, 401, 412, 409, 406, 405, 404, 403, 400};
size_t finalCodeIndex = std::numeric_limits<size_t>::max();
@@ -790,7 +790,7 @@ inline unsigned propogateErrorCode(unsigned finalCode, unsigned subResponseCode)
return std::max(finalCode, subResponseCode);
}
-// Propogates all error messages into |finalResponse|
+// Propagates all error messages into |finalResponse|
inline void propogateError(crow::Response& finalResponse,
crow::Response& subResponse)
{
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index fbee6ce44e..ee7dd4a013 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -391,7 +391,7 @@ inline std::string getDateTimeStdtime(std::time_t secondsSinceEpoch)
/**
* Returns the current Date, Time & the local Time Offset
- * infromation in a pair
+ * information in a pair
*
* @param[in] None
*
@@ -404,7 +404,7 @@ inline std::pair<std::string, std::string> getDateTimeOffsetNow()
std::string dateTime = getDateTimeStdtime(time);
/* extract the local Time Offset value from the
- * recevied dateTime string.
+ * received dateTime string.
*/
std::string timeOffset("Z00:00");
std::size_t lastPos = dateTime.size();