summaryrefslogtreecommitdiff
path: root/include/openbmc_dbus_rest.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-25 20:49:11 +0300
committerEd Tanous <ed@tanous.net>2022-01-28 22:43:59 +0300
commit26f6976f3905d7b20690bbf794fba746c1929ed3 (patch)
tree7cfaea46d4e70ea7b46275195f7d7024cb999dac /include/openbmc_dbus_rest.hpp
parentbb05f2227d53d590534d1df6e6a622e13cea76ae (diff)
downloadbmcweb-26f6976f3905d7b20690bbf794fba746c1929ed3.tar.xz
Enable readability-container-size-empty tests
This one is a little trivial, but it does help in readability. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5366d4eec8af2f781b3bad804131ae2eb806e3aa
Diffstat (limited to 'include/openbmc_dbus_rest.hpp')
-rw-r--r--include/openbmc_dbus_rest.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index abcec1a982..9233a278f8 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -1562,7 +1562,7 @@ inline void handleAction(const crow::Request& req,
const boost::system::error_code ec,
const std::vector<std::pair<std::string, std::vector<std::string>>>&
interfaceNames) {
- if (ec || interfaceNames.size() <= 0)
+ if (ec || interfaceNames.empty())
{
BMCWEB_LOG_ERROR << "Can't find object";
setErrorResponse(transaction->res,
@@ -1596,7 +1596,7 @@ inline void handleDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const boost::system::error_code ec,
const std::vector<std::pair<std::string, std::vector<std::string>>>&
interfaceNames) {
- if (ec || interfaceNames.size() <= 0)
+ if (ec || interfaceNames.empty())
{
BMCWEB_LOG_ERROR << "Can't find object";
setErrorResponse(asyncResp->res,
@@ -1701,7 +1701,7 @@ inline void handleGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
crow::connections::systemBus->async_method_call(
[asyncResp, path, propertyName](const boost::system::error_code ec,
const GetObjectType& objectNames) {
- if (ec || objectNames.size() <= 0)
+ if (ec || objectNames.empty())
{
setErrorResponse(asyncResp->res,
boost::beast::http::status::not_found,
@@ -1718,7 +1718,7 @@ inline void handleGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::vector<std::string>& interfaceNames =
connection.second;
- if (interfaceNames.size() <= 0)
+ if (interfaceNames.empty())
{
setErrorResponse(asyncResp->res,
boost::beast::http::status::not_found,
@@ -1875,7 +1875,7 @@ inline void handlePut(const crow::Request& req,
crow::connections::systemBus->async_method_call(
[transaction](const boost::system::error_code ec2,
const GetObjectType& objectNames) {
- if (!ec2 && objectNames.size() <= 0)
+ if (!ec2 && objectNames.empty())
{
setErrorResponse(transaction->asyncResp->res,
boost::beast::http::status::not_found,