diff --git a/interfaces/inner_api/syscap_interface.h b/interfaces/inner_api/syscap_interface.h index a26bfae415257e5679e97e31f68875786ab419de..f0c4bd59494af4f914ede45ede26b7271bea294b 100644 --- a/interfaces/inner_api/syscap_interface.h +++ b/interfaces/inner_api/syscap_interface.h @@ -26,7 +26,7 @@ #define PCID_MAIN_BYTES 128 #define PCID_MAIN_INTS 32 -#define E_EORROR (-1) +#define E_ERROR (-1) #define E_OK 0 #define E_APIVERSION 1 #define E_SYSCAP 2 @@ -54,7 +54,7 @@ char *DecodeRpcidToStringFormat(const char *inputFile); * rpcidString, input string format rpcid. * result, output comparison results. * retval: - * E_EORROR, compare failed. + * E_ERROR, compare failed. * E_OK, compare successful and meet the requirements. * E_APIVERSION, compare successful but api version too low. * E_SYSCAP, compare successful but missing some syscaps. diff --git a/src/create_pcid.c b/src/create_pcid.c index d7000b8914c07ad0ab710841addc7654db633739..7b99567c88c051562a78bb83617d749a784a8731 100644 --- a/src/create_pcid.c +++ b/src/create_pcid.c @@ -759,7 +759,7 @@ int32_t DecodeStringPCIDToJson(char *input, char *outDirPath) ret = 0; FAILED: - SafeFree(jsonBuffer); + cJSON_free(jsonBuffer); SafeFree(priSyscapStr); cJSON_Delete(sysCapObj); cJSON_Delete(rootObj); diff --git a/tools/syscap_collector.py b/tools/syscap_collector.py index 18ee661ba2099ae81ba212b89b7dae5f809a7bae..74c0f963146ee14ffe8b0b3eca255fca5e8fc175 100755 --- a/tools/syscap_collector.py +++ b/tools/syscap_collector.py @@ -208,7 +208,7 @@ def _check_path_prefix(paths): def traversal_files(subsystem_path, _files): for item in os.scandir(subsystem_path): - if is_symlik(item.path): + if is_symlink(item.path): continue elif item.is_file() and item.name == 'ohos.build': _files.append(item.path) @@ -230,7 +230,7 @@ def get_file_type(file_path): return 'unknown' -def is_symlik(file_path): +def is_symlink(file_path): file_type = get_file_type(file_path) if file_type == 'symlink': link_target = os.readlink(file_path)