!52 修复混用无符号数和有符号数。

Merge pull request !52 from chenyude/syscap-tool
This commit is contained in:
openharmony_ci
2022-05-30 10:29:28 +00:00
committed by Gitee
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
typedef struct SystemCapabilityWithNum {
char syscapStr[128];
int num;
uint16_t num;
} SyscapWithNum;
/* sort by alphabet */
+1 -1
View File
@@ -599,7 +599,7 @@ static int32_t AddOsSyscapToJsonObj(uint32_t *osSyscapArray, uint32_t osSyscapAr
uint32_t i, j;
uint32_t osSyscapCount = 0;
int32_t index[BYTES_OF_OS_SYSCAP * UINT8_BIT] = {0};
uint16_t index[BYTES_OF_OS_SYSCAP * UINT8_BIT] = {0};
for (i = 0; i < BYTES_OF_OS_SYSCAP; i++) {
for (j = 0; j < UINT8_BIT; j++) {
if (osSysCapArrayUint8[i] & (0x01 << j)) {