mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-28 04:40:02 -04:00
Uniform syscap length.
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I68c43b300e2a729aae0a1aa7a287ee1916b1c5a1
This commit is contained in:
@@ -247,8 +247,13 @@ bool DecodePrivateSyscap(char *input, char (**output)[SINGLE_SYSCAP_LEN], int *o
|
||||
}
|
||||
inputPos++;
|
||||
}
|
||||
inputPos = input;
|
||||
if (syscapCnt == 0) {
|
||||
*output = outputArray;
|
||||
*outputCnt = syscapCnt;
|
||||
return true;
|
||||
}
|
||||
|
||||
inputPos = input;
|
||||
bufferLen = SINGLE_SYSCAP_LEN * syscapCnt;
|
||||
outputArray = (char (*)[SINGLE_SYSCAP_LEN])malloc(bufferLen);
|
||||
if (outputArray == NULL) {
|
||||
|
||||
@@ -19,9 +19,13 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef SINGLE_SYSCAP_LEN
|
||||
#define SINGLE_SYSCAP_LEN (256 + 17)
|
||||
#endif // SINGLE_SYSCAP_LEN
|
||||
#define MAX_MISS_SYSCAP 512
|
||||
#define SINGLE_SYSCAP_LEN 256
|
||||
#define PCID_MAIN_BYTES 128
|
||||
#define PCID_MAIN_INTS 32
|
||||
|
||||
#define E_OK 0
|
||||
#define E_APIVERSION 1
|
||||
#define E_SYSCAP 2
|
||||
|
||||
Reference in New Issue
Block a user