sdm845-common: Check strncmp return value properly

* Apparently Android's strcmp returns <0 on mismatched length.
* Also it's not like this check was smart anyway, we should be checking == 0.

Change-Id: I34d8a79f3c73c293d16a15736ff32c2223f45144
This commit is contained in:
LuK1337 2020-08-23 20:53:57 +02:00 committed by Bruno Martins
parent 8d9802fca3
commit 0c92f3709f

View File

@ -179,7 +179,7 @@ Value* VerifyTrustZoneFn(const char* name, State* state,
ret = 0;
for (auto &tz_version : args) {
if (strncmp(tz_version.c_str(), current_tz_version, tz_version.length()) <= 0) {
if (strncmp(tz_version.c_str(), current_tz_version, tz_version.length()) == 0) {
ret = 1;
break;
}