diff --git a/libwvdrmengine/cdm/core/src/device_files.cpp b/libwvdrmengine/cdm/core/src/device_files.cpp index 48e17603..2016c8d2 100644 --- a/libwvdrmengine/cdm/core/src/device_files.cpp +++ b/libwvdrmengine/cdm/core/src/device_files.cpp @@ -393,8 +393,7 @@ bool DeviceFiles::DeleteUsageInfo(const std::string& app_id, int index = 0; bool found = false; for (; index < usage_info->sessions_size(); ++index) { - if (usage_info->sessions(index).token().compare(provider_session_token) == - 0) { + if (usage_info->sessions(index).token() == provider_session_token) { found = true; break; } @@ -505,8 +504,7 @@ bool DeviceFiles::RetrieveUsageInfo(const std::string& app_id, int index = 0; bool found = false; for (; index < file.usage_info().sessions_size(); ++index) { - if (file.usage_info().sessions(index).token().compare( - provider_session_token) == 0) { + if (file.usage_info().sessions(index).token() == provider_session_token) { found = true; break; } @@ -667,7 +665,7 @@ bool DeviceFiles::RetrieveHashedFile(const char* name, return false; } - if (hash.compare(hash_file.hash())) { + if (hash != hash_file.hash()) { LOGW("DeviceFiles::RetrieveHashedFile: Hash mismatch"); // Remove the corrupted file so the caller will not get the same error // when trying to access the file repeatedly, causing the system to stall.