firmware_handler: minor code cleanup
Just return based on the result of the condition instead of deliberately
checking each condition.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I291d8c388d707fe880e70374c3746e595d410632
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 5873c69..6e02024 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -120,12 +120,7 @@
/* Check if the path is in our supported list (or active list). */
bool FirmwareBlobHandler::canHandleBlob(const std::string& path)
{
- if (std::count(blobIDs.begin(), blobIDs.end(), path))
- {
- return true;
- }
-
- return false;
+ return (std::count(blobIDs.begin(), blobIDs.end(), path) > 0);
}
/*