diff options
author | Ed Tanous <edtanous@google.com> | 2022-01-25 20:49:11 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-01-28 22:43:59 +0300 |
commit | 26f6976f3905d7b20690bbf794fba746c1929ed3 (patch) | |
tree | 7cfaea46d4e70ea7b46275195f7d7024cb999dac /redfish-core/lib/pcie.hpp | |
parent | bb05f2227d53d590534d1df6e6a622e13cea76ae (diff) | |
download | bmcweb-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 'redfish-core/lib/pcie.hpp')
-rw-r--r-- | redfish-core/lib/pcie.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp index 78fa66924e..10655bf986 100644 --- a/redfish-core/lib/pcie.hpp +++ b/redfish-core/lib/pcie.hpp @@ -217,7 +217,7 @@ inline void requestRoutesSystemPCIeDevice(App& app) messages::internalError(asyncResp->res); return; } - if (*generationInUse == "") + if (generationInUse->empty()) { // unknown, no need to handle return; @@ -303,7 +303,7 @@ inline void requestRoutesSystemPCIeFunctionCollection(App& app) "DeviceId"; std::string* property = std::get_if<std::string>( &pcieDevProperties[devIDProperty]); - if (property && !property->empty()) + if (property != nullptr && !property->empty()) { pcieFunctionList.push_back( {{"@odata.id", @@ -365,7 +365,7 @@ inline void requestRoutesSystemPCIeFunction(App& app) "Function" + function + "DeviceId"; if (std::string* property = std::get_if<std::string>( &pcieDevProperties[devIDProperty]); - property && property->empty()) + property != nullptr && property->empty()) { messages::resourceNotFound(asyncResp->res, "PCIeFunction", function); |