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:
parent
8d9802fca3
commit
0c92f3709f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user