mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 20:29:57 -04:00
fix: fix implicit narrowing conversation.
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I918070331891a79140d36c200daace5c0391499c
This commit is contained in:
@@ -161,8 +161,8 @@ bool EncodePrivateSyscap(char **output, int *outputLen)
|
||||
return false;
|
||||
}
|
||||
|
||||
int priLen = bufferLen - PCID_MAIN_BYTES - 1;
|
||||
if (priLen <= 0) {
|
||||
uint32_t priLen = bufferLen - PCID_MAIN_BYTES - 1;
|
||||
if ((int)priLen <= 0) {
|
||||
*outputLen = 0;
|
||||
return false;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ bool EncodePrivateSyscap(char **output, int *outputLen)
|
||||
}
|
||||
|
||||
FreeContextBuffer(contextBuffer);
|
||||
*outputLen = strlen(outputStr);
|
||||
*outputLen = (int)strlen(outputStr);
|
||||
*output = outputStr;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user