未验证 提交 6cc4fd44 编写于 作者: O openharmony_ci 提交者: Gitee

!1778 FIX:修改编码规范

Merge pull request !1778 from cheng_jinsong/0217_pp
......@@ -83,8 +83,8 @@ static int moduleMgrCommandsInit(const HOOK_INFO *info, void *cookie)
static int loadAutorunModules(const HOOK_INFO *info, void *cookie)
{
MODULE_MGR *autorun = ModuleMgrScan("init/autorun");
INIT_LOGV("Load autorun modules return %p", autorun);
(void)ModuleMgrScan("init/autorun");
INIT_LOGV("Load autorun modules return autorun");
return 0;
}
......
......@@ -229,7 +229,7 @@ InitGroupNode *AddGroupNode(int type, const char *name)
if (groupNode != NULL) {
return groupNode;
}
INIT_LOGV("AddGroupNode type %d %p name %s", type, g_initWorkspace.hashMap[type], name);
INIT_LOGV("AddGroupNode type %d name %s", type, name);
uint32_t nameLen = (uint32_t)strlen(name);
groupNode = (InitGroupNode *)calloc(1, sizeof(InitGroupNode) + nameLen + 1);
INIT_ERROR_CHECK(groupNode != NULL, return NULL, "Failed to alloc for group %s", name);
......@@ -251,7 +251,7 @@ InitGroupNode *GetGroupNode(int type, const char *name)
if (type >= NODE_TYPE_GROUPS) {
return NULL;
}
INIT_LOGV("GetGroupNode type %d %p name %s", type, g_initWorkspace.hashMap[type], name);
INIT_LOGV("GetGroupNode type %d name %s", type, name);
HashNode *node = OH_HashMapGet(g_initWorkspace.hashMap[type], name);
if (node == NULL) {
return NULL;
......@@ -273,7 +273,7 @@ void DelGroupNode(int type, const char *name)
if (type >= NODE_TYPE_GROUPS) {
return;
}
INIT_LOGV("DelGroupNode type %d %p name %s", type, g_initWorkspace.hashMap[type], name);
INIT_LOGV("DelGroupNode type %d name %s", type, name);
OH_HashMapRemove(g_initWorkspace.hashMap[type], name);
InitGroupNode *groupNode = g_initWorkspace.groupNodes[type];
InitGroupNode *preNode = groupNode;
......
......@@ -55,7 +55,7 @@ BaseTask *CreateTask(const LoopHandle loopHandle, int fd, const LE_BaseInfo *inf
void CloseTask(const LoopHandle loopHandle, BaseTask *task)
{
LE_LOGV("CloseTask %p", task);
LE_LOGV("CloseTask");
LE_CHECK(loopHandle != NULL && task != NULL, return, "Invalid parameters");
if (CheckTaskFlags(task, TASK_STREAM | TASK_CONNECT) ||
CheckTaskFlags(task, TASK_EVENT | TASK_ASYNC_EVENT)) {
......@@ -189,7 +189,7 @@ LE_STATUS LE_Send(const LoopHandle loopHandle,
void LE_CloseTask(const LoopHandle loopHandle, const TaskHandle taskHandle)
{
LE_CHECK(loopHandle != NULL && taskHandle != NULL, return, "Invalid parameters");
LE_LOGV("LE_CloseTask %d %p", GetSocketFd(taskHandle), taskHandle);
LE_LOGV("LE_CloseTask %d", GetSocketFd(taskHandle));
BaseTask *task = (BaseTask *)taskHandle;
if (task->innerClose != NULL) {
task->innerClose(loopHandle, taskHandle);
......
......@@ -184,7 +184,7 @@ INIT_INNER_API int InitParamWorkSpace(int onlyRead, const PARAM_WORKSPACE_OPS *o
INIT_LOCAL_API void CloseParamWorkSpace(void)
{
PARAM_LOGI("CloseParamWorkSpace %p", &g_paramWorkSpace);
PARAM_LOGI("CloseParamWorkSpace");
if (!PARAM_TEST_FLAG(g_paramWorkSpace.flags, WORKSPACE_FLAGS_INIT)) {
return;
}
......
......@@ -37,7 +37,7 @@ static ParamService g_paramService = {};
PARAM_STATIC void OnClose(ParamTaskPtr client)
{
PARAM_LOGV("OnClose %p", client);
PARAM_LOGV("OnClose client");
ParamWatcher *watcher = (ParamWatcher *)ParamGetTaskUserData(client);
if (client == g_paramService.watcherTask) {
ClearWatchTrigger(watcher, TRIGGER_PARAM_WATCH);
......
......@@ -707,7 +707,7 @@ void ClearWatchTrigger(ParamWatcher *watcher, int type)
PARAM_LOGE("ClearWatchTrigger %s error type %d", GetTriggerName(trigger), type);
return;
}
PARAM_LOGV("ClearWatchTrigger %p %s", trigger, GetTriggerName(trigger));
PARAM_LOGV("ClearWatchTrigger %s", GetTriggerName(trigger));
ListNode *next = node->next;
FreeTrigger(GetTriggerWorkSpace(), trigger);
node = next;
......
......@@ -242,8 +242,7 @@ void WatcherManagerKits::ParamWatcher::RemoveParameterListener(uint32_t idx)
int WatcherManagerKits::ParamWatcher::AddParameterListener(ParameterChangePtr callback, void *context)
{
WATCHER_CHECK(callback != nullptr, return -1, "Invalid callback ");
WATCHER_LOGV("AddParameterListener %s listenerId_ %d callback %p context %p",
keyPrefix_.c_str(), listenerId_, callback, context);
WATCHER_LOGV("AddParameterListener %s listenerId_ %d", keyPrefix_.c_str(), listenerId_);
for (auto it = parameterChangeListeners.begin(); it != parameterChangeListeners.end(); it++) {
if (it->second == nullptr) {
continue;
......@@ -270,7 +269,7 @@ int WatcherManagerKits::ParamWatcher::DelParameterListener(ParameterChangePtr ca
ParameterChangeListener *listener = GetParameterListener(&index);
while (listener != nullptr) {
if (listener->IsEqual(callback, context)) {
WATCHER_LOGV("DelParameterListener listenerId_ %d callback %p context %p", index, callback, context);
WATCHER_LOGV("DelParameterListener listenerId_ %d", index);
RemoveParameterListener(index);
break;
}
......
......@@ -90,7 +90,7 @@ int32_t OH_HashMapAdd(HashMapHandle handle, HashNode *node)
}
node->next = tab->buckets[hashCode];
tab->buckets[hashCode] = node;
INIT_LOGV("OH_HashMapAdd tableId %d hashCode %d node %p", tab->tableId, hashCode, node);
INIT_LOGV("OH_HashMapAdd tableId %d hashCode %d", tab->tableId, hashCode);
return 0;
}
......
......@@ -63,7 +63,7 @@ static int OhosTestHookMultiThreadAnother(const HOOK_INFO *hookInfo, void *execu
static void OhosHookPrint(const HOOK_INFO *hookInfo, void *traversalCookie)
{
printf("\tstage[%02d] prio[%02d] hook[%p].\n", hookInfo->stage, hookInfo->prio, hookInfo->hook);
printf("\tstage[%02d] prio[%02d].\n", hookInfo->stage, hookInfo->prio);
}
static void DumpAllHooks(HOOK_MGR *hookMgr)
......
......@@ -67,7 +67,7 @@ static int OhosTestHookRetOKEx2(const HOOK_INFO *hookInfo, void *executionContex
static void OhosHookPrint(const HOOK_INFO *hookInfo, void *traversalCookie)
{
printf("\tstage[%02d] prio[%02d] hook[%p].\n", hookInfo->stage, hookInfo->prio, hookInfo->hook);
printf("\tstage[%02d] prio[%02d].\n", hookInfo->stage, hookInfo->prio);
}
static void dumpAllHooks(HOOK_MGR *hookMgr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册