提交 710b8e81 编写于 作者: C chengjinsong

codex

Signed-off-by: Nchengjinsong <chengjinsong2@huawei.com>
上级 93e0c848
...@@ -262,7 +262,7 @@ static int hookExecutionProc(ListNode *node, void *cookie) ...@@ -262,7 +262,7 @@ static int hookExecutionProc(ListNode *node, void *cookie)
*/ */
int HookMgrExecute(HOOK_MGR *hookMgr, int stage, void *executionContext, const HOOK_EXEC_OPTIONS *options) int HookMgrExecute(HOOK_MGR *hookMgr, int stage, void *executionContext, const HOOK_EXEC_OPTIONS *options)
{ {
int flags; unsigned int flags;
HOOK_STAGE *stageItem; HOOK_STAGE *stageItem;
HOOK_EXECUTION_ARGS args; HOOK_EXECUTION_ARGS args;
...@@ -276,7 +276,7 @@ int HookMgrExecute(HOOK_MGR *hookMgr, int stage, void *executionContext, const H ...@@ -276,7 +276,7 @@ int HookMgrExecute(HOOK_MGR *hookMgr, int stage, void *executionContext, const H
flags = 0; flags = 0;
if (options != NULL) { if (options != NULL) {
flags = options->flags; flags = (unsigned int)(options->flags);
} }
args.executionContext = executionContext; args.executionContext = executionContext;
......
...@@ -27,6 +27,7 @@ extern "C" { ...@@ -27,6 +27,7 @@ extern "C" {
#define PARAM_NAME_LEN_MAX 96 #define PARAM_NAME_LEN_MAX 96
#define OS_FULL_NAME_LEN 128 #define OS_FULL_NAME_LEN 128
#define VERSION_ID_MAX_LEN 256 #define VERSION_ID_MAX_LEN 256
#define PARAM_BUFFER_MAX (0x01 << 16)
static const char EMPTY_STR[] = { "" }; static const char EMPTY_STR[] = { "" };
......
...@@ -42,7 +42,7 @@ INIT_LOCAL_API int IsValidParamValue(const char *value, uint32_t len) ...@@ -42,7 +42,7 @@ INIT_LOCAL_API int IsValidParamValue(const char *value, uint32_t len)
INIT_LOCAL_API int GetParameter_(const char *key, const char *def, char *value, uint32_t len) INIT_LOCAL_API int GetParameter_(const char *key, const char *def, char *value, uint32_t len)
{ {
if ((key == NULL) || (value == NULL)) { if ((key == NULL) || (value == NULL) || (len > (uint32_t)PARAM_BUFFER_MAX)) {
return EC_INVALID; return EC_INVALID;
} }
uint32_t size = len; uint32_t size = len;
......
...@@ -169,7 +169,7 @@ ListNode *OH_ListFind(const ListNode *head, void *data, ListTraversalProc compar ...@@ -169,7 +169,7 @@ ListNode *OH_ListFind(const ListNode *head, void *data, ListTraversalProc compar
* @return return -1 for invalid input arguments. * @return return -1 for invalid input arguments.
* when TRAVERSE_STOP_WHEN_ERROR is specified, it will return errors from traversalProc * when TRAVERSE_STOP_WHEN_ERROR is specified, it will return errors from traversalProc
*/ */
int OH_ListTraversal(ListNode *head, void *data, ListTraversalProc traversalProc, int flags); int OH_ListTraversal(ListNode *head, void *data, ListTraversalProc traversalProc, unsigned int flags);
/** /**
* @brief ListNode destroy function prototype * @brief ListNode destroy function prototype
......
...@@ -151,7 +151,7 @@ ListNode *OH_ListFind(const ListNode *head, void *data, ListTraversalProc compar ...@@ -151,7 +151,7 @@ ListNode *OH_ListFind(const ListNode *head, void *data, ListTraversalProc compar
* @return return -1 for invalid input arguments. * @return return -1 for invalid input arguments.
* when TRAVERSE_STOP_WHEN_ERROR is specified, it will return errors from traversalProc * when TRAVERSE_STOP_WHEN_ERROR is specified, it will return errors from traversalProc
*/ */
int OH_ListTraversal(ListNode *head, void *data, ListTraversalProc traversalProc, int flags) int OH_ListTraversal(ListNode *head, void *data, ListTraversalProc traversalProc, unsigned int flags)
{ {
int ret; int ret;
ListNode *match; ListNode *match;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册