diff --git a/include/syscap_define.h b/include/syscap_define.h index 8958c3f0b8269f3a5ed54a53259310607265e402..03cf66e52b1033da997a531a2e145b111449efb6 100644 --- a/include/syscap_define.h +++ b/include/syscap_define.h @@ -18,7 +18,7 @@ typedef struct SystemCapabilityWithNum { char syscapStr[128]; - int num; + uint16_t num; } SyscapWithNum; /* sort by alphabet */ diff --git a/src/create_pcid.c b/src/create_pcid.c index aceb232b9f442cb01fa39f4e2b596ae4a494f5a8..35f20bcb7e2939b8116c8b59425d70f916744f67 100644 --- a/src/create_pcid.c +++ b/src/create_pcid.c @@ -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)) {