diff --git a/include/syscap_define.h b/include/syscap_define.h index 127b653..d7ceb8f 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 aceb232..35f20bc 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)) {