!2810 fix code check

Merge pull request !2810 from 钟柠/0508_timer
This commit is contained in:
openharmony_ci 2024-05-10 11:09:48 +00:00 committed by Gitee
commit 8d979000b5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ void AddOnDemandSocket(ServiceSocket *socketNode)
void RemoveOnDemandSocket(ServiceSocket *sockopt)
{
INIT_ERROR_CHECK(sockopt != NULL, return, "sockopt is NULL!");
INIT_CHECK(sockopt != NULL, return);
ServiceSocket *tmp = g_initWorkspace.serviceSocketNode;
INIT_ERROR_CHECK(tmp != NULL, return, "tmp is NULL!");
if (tmp->service == sockopt->service) {

View File

@ -180,8 +180,8 @@ void CancelTimer(TimerHandle timerHandle)
LoopMutexLock(&timer->mutex);
OH_ListRemove(&timer->node);
OH_ListInit(&timer->node);
free(timer);
LoopMutexUnlock(&timer->mutex);
free(timer);
}
void LE_StopTimer(const LoopHandle loopHandle, const TimerHandle timer)