updater: remove find() and use std::string::starts_with()
Use std::string::starts_with to check for active blob prefix.
Change-Id: I03271c5f19781b522287d09ed8e2882baf68d3e0
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/tools/updater.cpp b/tools/updater.cpp
index 4963103..453b9a9 100644
--- a/tools/updater.cpp
+++ b/tools/updater.cpp
@@ -57,7 +57,7 @@
for (const auto& activeBlob : blobList)
{
// Prefix is /flash/active/
- if (activeBlob.find("/flash/active/", 0) == 0)
+ if (activeBlob.starts_with("/flash/active/"))
{
std::fprintf(stderr, "Found an active blob, deleting %s\n",
activeBlob.c_str());