Signed-off-by: chengjinsong <chengjinsong2@huawei.com>
This commit is contained in:
chengjinsong 2022-09-14 12:47:43 +08:00
parent 645e2c2847
commit 40626fb31f
4 changed files with 3 additions and 5 deletions

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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;
}