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

!1777 FIX:修改编码规范

Merge pull request !1777 from cheng_jinsong/0217_p
...@@ -87,7 +87,7 @@ static int moduleMgrCommandsInit(const HOOK_INFO *info, void *cookie) ...@@ -87,7 +87,7 @@ static int moduleMgrCommandsInit(const HOOK_INFO *info, void *cookie)
static int loadAutorunModules(const HOOK_INFO *info, void *cookie) static int loadAutorunModules(const HOOK_INFO *info, void *cookie)
{ {
autorunModuleMgr = ModuleMgrScan("init/autorun"); autorunModuleMgr = ModuleMgrScan("init/autorun");
INIT_LOGV("Load autorun modules return %p", autorunModuleMgr); INIT_LOGV("Load autorun modules return autorunModuleMgr");
return 0; return 0;
} }
......
...@@ -229,7 +229,7 @@ InitGroupNode *AddGroupNode(int type, const char *name) ...@@ -229,7 +229,7 @@ InitGroupNode *AddGroupNode(int type, const char *name)
if (groupNode != NULL) { if (groupNode != NULL) {
return groupNode; 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); uint32_t nameLen = (uint32_t)strlen(name);
groupNode = (InitGroupNode *)calloc(1, sizeof(InitGroupNode) + nameLen + 1); groupNode = (InitGroupNode *)calloc(1, sizeof(InitGroupNode) + nameLen + 1);
INIT_ERROR_CHECK(groupNode != NULL, return NULL, "Failed to alloc for group %s", name); INIT_ERROR_CHECK(groupNode != NULL, return NULL, "Failed to alloc for group %s", name);
...@@ -272,7 +272,7 @@ void DelGroupNode(int type, const char *name) ...@@ -272,7 +272,7 @@ void DelGroupNode(int type, const char *name)
if (type >= NODE_TYPE_GROUPS) { if (type >= NODE_TYPE_GROUPS) {
return; 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); OH_HashMapRemove(g_initWorkspace.hashMap[type], name);
InitGroupNode *groupNode = g_initWorkspace.groupNodes[type]; InitGroupNode *groupNode = g_initWorkspace.groupNodes[type];
InitGroupNode *preNode = groupNode; InitGroupNode *preNode = groupNode;
......
...@@ -55,7 +55,7 @@ BaseTask *CreateTask(const LoopHandle loopHandle, int fd, const LE_BaseInfo *inf ...@@ -55,7 +55,7 @@ BaseTask *CreateTask(const LoopHandle loopHandle, int fd, const LE_BaseInfo *inf
void CloseTask(const LoopHandle loopHandle, BaseTask *task) void CloseTask(const LoopHandle loopHandle, BaseTask *task)
{ {
LE_LOGV("CloseTask %p", task); LE_LOGV("CloseTask");
LE_CHECK(loopHandle != NULL && task != NULL, return, "Invalid parameters"); LE_CHECK(loopHandle != NULL && task != NULL, return, "Invalid parameters");
if (CheckTaskFlags(task, TASK_STREAM | TASK_CONNECT) || if (CheckTaskFlags(task, TASK_STREAM | TASK_CONNECT) ||
CheckTaskFlags(task, TASK_EVENT | TASK_ASYNC_EVENT)) { CheckTaskFlags(task, TASK_EVENT | TASK_ASYNC_EVENT)) {
...@@ -189,7 +189,7 @@ LE_STATUS LE_Send(const LoopHandle loopHandle, ...@@ -189,7 +189,7 @@ LE_STATUS LE_Send(const LoopHandle loopHandle,
void LE_CloseTask(const LoopHandle loopHandle, const TaskHandle taskHandle) void LE_CloseTask(const LoopHandle loopHandle, const TaskHandle taskHandle)
{ {
LE_CHECK(loopHandle != NULL && taskHandle != NULL, return, "Invalid parameters"); 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; BaseTask *task = (BaseTask *)taskHandle;
if (task->innerClose != NULL) { if (task->innerClose != NULL) {
task->innerClose(loopHandle, taskHandle); task->innerClose(loopHandle, taskHandle);
......
...@@ -711,7 +711,7 @@ void ClearWatchTrigger(ParamWatcher *watcher, int type) ...@@ -711,7 +711,7 @@ void ClearWatchTrigger(ParamWatcher *watcher, int type)
PARAM_LOGE("ClearWatchTrigger %s error type %d", GetTriggerName(trigger), type); PARAM_LOGE("ClearWatchTrigger %s error type %d", GetTriggerName(trigger), type);
return; return;
} }
PARAM_LOGV("ClearWatchTrigger %p %s", trigger, GetTriggerName(trigger)); PARAM_LOGV("ClearWatchTrigger %s", GetTriggerName(trigger));
ListNode *next = node->next; ListNode *next = node->next;
FreeTrigger(GetTriggerWorkSpace(), trigger); FreeTrigger(GetTriggerWorkSpace(), trigger);
node = next; node = next;
......
...@@ -233,8 +233,7 @@ void WatcherManagerKits::ParamWatcher::RemoveParameterListener(uint32_t idx) ...@@ -233,8 +233,7 @@ void WatcherManagerKits::ParamWatcher::RemoveParameterListener(uint32_t idx)
int WatcherManagerKits::ParamWatcher::AddParameterListener(ParameterChangePtr callback, void *context) int WatcherManagerKits::ParamWatcher::AddParameterListener(ParameterChangePtr callback, void *context)
{ {
WATCHER_CHECK(callback != nullptr, return -1, "Invalid callback "); WATCHER_CHECK(callback != nullptr, return -1, "Invalid callback ");
WATCHER_LOGV("AddParameterListener %s listenerId_ %d callback %p context %p", WATCHER_LOGV("AddParameterListener %s listenerId_ %d", keyPrefix_.c_str(), listenerId_);
keyPrefix_.c_str(), listenerId_, callback, context);
for (auto it = parameterChangeListeners.begin(); it != parameterChangeListeners.end(); it++) { for (auto it = parameterChangeListeners.begin(); it != parameterChangeListeners.end(); it++) {
if (it->second == nullptr) { if (it->second == nullptr) {
continue; continue;
...@@ -261,7 +260,7 @@ int WatcherManagerKits::ParamWatcher::DelParameterListener(ParameterChangePtr ca ...@@ -261,7 +260,7 @@ int WatcherManagerKits::ParamWatcher::DelParameterListener(ParameterChangePtr ca
ParameterChangeListener *listener = GetParameterListener(&index); ParameterChangeListener *listener = GetParameterListener(&index);
while (listener != nullptr) { while (listener != nullptr) {
if (listener->IsEqual(callback, context)) { 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); RemoveParameterListener(index);
break; break;
} }
......
...@@ -63,7 +63,7 @@ static int OhosTestHookMultiThreadAnother(const HOOK_INFO *hookInfo, void *execu ...@@ -63,7 +63,7 @@ static int OhosTestHookMultiThreadAnother(const HOOK_INFO *hookInfo, void *execu
static void OhosHookPrint(const HOOK_INFO *hookInfo, void *traversalCookie) 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) static void DumpAllHooks(HOOK_MGR *hookMgr)
......
...@@ -67,7 +67,7 @@ static int OhosTestHookRetOKEx2(const HOOK_INFO *hookInfo, void *executionContex ...@@ -67,7 +67,7 @@ static int OhosTestHookRetOKEx2(const HOOK_INFO *hookInfo, void *executionContex
static void OhosHookPrint(const HOOK_INFO *hookInfo, void *traversalCookie) 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) static void dumpAllHooks(HOOK_MGR *hookMgr)
......
...@@ -253,11 +253,11 @@ public: ...@@ -253,11 +253,11 @@ public:
ret = LE_CreateStreamServer(g_loopServer_, &pipeServer, &info); ret = LE_CreateStreamServer(g_loopServer_, &pipeServer, &info);
EXPECT_EQ(ret, 0); EXPECT_EQ(ret, 0);
printf("Run server pipeServer_ %p \n", pipeServer); printf("Run server pipeServer_ \n");
// run loop for server // run loop for server
LE_RunLoop(g_loopServer_); LE_RunLoop(g_loopServer_);
printf("Run server pipeServer_ %p \n", pipeServer); printf("Run server pipeServer_ \n");
LE_CloseStreamTask(g_loopServer_, pipeServer); LE_CloseStreamTask(g_loopServer_, pipeServer);
pipeServer = nullptr; pipeServer = nullptr;
LE_CloseStreamTask(g_loopServer_, tcpServer); LE_CloseStreamTask(g_loopServer_, tcpServer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册