mirror of
https://github.com/openharmony/security_device_auth.git
synced 2026-08-24 19:23:10 -04:00
fix condition is not bool
Signed-off-by: kou-chuxiong <kouchuxiong@h-partners.com> Change-Id: Ica9dfe43977bbd0d88f38569f2807d10cb743746
This commit is contained in:
@@ -170,7 +170,7 @@ static void ReplaceStringToInt(char *input, const char *keyName)
|
||||
if (shouldReplace) {
|
||||
uint32_t readI = startOffset + SPLIT_LEN_ONE;
|
||||
uint32_t writeI = startOffset;
|
||||
while (input[readI]) {
|
||||
while (input[readI] != '\0') {
|
||||
input[writeI] = input[readI];
|
||||
readI++;
|
||||
writeI++;
|
||||
|
||||
@@ -100,7 +100,7 @@ static int TaskThreadLoop(void* args)
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
if (thread->quit) {
|
||||
LOGW("thread quit!");
|
||||
break;
|
||||
|
||||
@@ -135,7 +135,7 @@ static bool LoadStringVectorFromParcel(StringVector *vec, HcParcel *parcel)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} while (1);
|
||||
} while (true);
|
||||
}
|
||||
|
||||
static bool SaveStringVectorToParcel(const StringVector *vec, HcParcel *parcel)
|
||||
|
||||
@@ -167,7 +167,7 @@ static bool LoadStringVectorFromParcel(StringVector *vec, HcParcel *parcel)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} while (1);
|
||||
} while (true);
|
||||
}
|
||||
|
||||
static bool SaveStringVectorToParcel(const StringVector *vec, HcParcel *parcel)
|
||||
|
||||
@@ -824,7 +824,7 @@ HWTEST_F(CommonLibTest, ParseTlvNodeTest001, TestSize.Level0)
|
||||
|
||||
HWTEST_F(CommonLibTest, IsStrEqualTest001, TestSize.Level0)
|
||||
{
|
||||
EXPECT_EQ(IsStrEqual(nullptr, nullptr), false);
|
||||
EXPECT_EQ(IsStrEqual(nullptr, nullptr), true);
|
||||
EXPECT_EQ(IsStrEqual("123", nullptr), false);
|
||||
EXPECT_EQ(IsStrEqual(nullptr, "123"), false);
|
||||
EXPECT_EQ(IsStrEqual("123", "123"), true);
|
||||
|
||||
Reference in New Issue
Block a user