mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-02 16:06:31 +00:00
codex
Signed-off-by: chengjinsong <chengjinsong2@huawei.com>
This commit is contained in:
parent
645e2c2847
commit
40626fb31f
@ -140,7 +140,7 @@ void ReleaseService(Service *service)
|
||||
FreeServiceSocket(service->socketCfg);
|
||||
FreeServiceFile(service->fileCfg);
|
||||
|
||||
if(service->apl != NULL) {
|
||||
if (service->apl != NULL) {
|
||||
free(service->apl);
|
||||
service->apl = NULL;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ static LE_STATUS HandleSendMsg_(const LoopHandle loopHandle,
|
||||
while (buffer) {
|
||||
int ret = write(GetSocketFd(taskHandle), buffer->data, buffer->dataSize);
|
||||
LE_LOGV("HandleSendMsg_ fd:%d send data size %d %d", GetSocketFd(taskHandle), buffer->dataSize, ret);
|
||||
buffer->result = (ret == buffer->dataSize) ? 0 : errno;
|
||||
buffer->result = (ret == (int)buffer->dataSize) ? 0 : errno;
|
||||
if (complete != NULL) {
|
||||
complete(taskHandle, buffer);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ static ModuleCmdInfo g_rebootCmdIds[] = {
|
||||
static void RebootAdpInit(void)
|
||||
{
|
||||
for (size_t i = 0; i < sizeof(g_rebootCmdIds)/sizeof(g_rebootCmdIds[0]); i++) {
|
||||
g_rebootCmdIds[i].cmdId = AddCmdExecutor(g_rebootCmdIds[i].cmd, g_rebootCmdIds[i].executor);
|
||||
g_rebootCmdIds[i].cmdId = (uint32_t)AddCmdExecutor(g_rebootCmdIds[i].cmd, g_rebootCmdIds[i].executor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,6 @@ int WatcherManagerKits::ParamWatcher::AddParameterListener(ParameterChangePtr ca
|
||||
continue;
|
||||
}
|
||||
if (it->second->IsEqual(callback, context)) {
|
||||
WATCHER_LOGI("AddParameterListener callback %p context %p exist", callback, context);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -244,7 +243,6 @@ int WatcherManagerKits::ParamWatcher::DelParameterListener(ParameterChangePtr ca
|
||||
if ((callback == nullptr && context == nullptr)) {
|
||||
RemoveParameterListener(index);
|
||||
} else if (listener->IsEqual(callback, context)) {
|
||||
WATCHER_LOGI("DelParameterListener callback %p context %p", callback, context);
|
||||
RemoveParameterListener(index);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user