diff --git a/src/api/api_lib.c b/src/api/api_lib.c index b8679a71..11d95034 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -1346,7 +1346,7 @@ void netconn_thread_init(void) { sys_sem_t *sem = LWIP_NETCONN_THREAD_SEM_GET(); - if ((sem == NULL) || !sys_sem_valid(sem)) { + if (!sys_sem_valid(sem)) { /* call alloc only once */ LWIP_NETCONN_THREAD_SEM_ALLOC(); LWIP_ASSERT("LWIP_NETCONN_THREAD_SEM_ALLOC() failed", sys_sem_valid(LWIP_NETCONN_THREAD_SEM_GET())); @@ -1357,7 +1357,7 @@ void netconn_thread_cleanup(void) { sys_sem_t *sem = LWIP_NETCONN_THREAD_SEM_GET(); - if ((sem != NULL) && sys_sem_valid(sem)) { + if (sys_sem_valid(sem)) { /* call free only once */ LWIP_NETCONN_THREAD_SEM_FREE(); }