mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 15:16:02 +00:00
snmp_threadsync.c: Fix ignored return value of mutex/semaphore creation. Found by Coverity.
This commit is contained in:
parent
273d609bac
commit
09b850cc6f
|
@ -199,8 +199,10 @@ snmp_threadsync_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, stru
|
||||||
/** Initializes thread synchronization instance */
|
/** Initializes thread synchronization instance */
|
||||||
void snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn)
|
void snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn)
|
||||||
{
|
{
|
||||||
sys_mutex_new(&instance->sem_usage_mutex);
|
err_t err = sys_mutex_new(&instance->sem_usage_mutex);
|
||||||
sys_sem_new(&instance->sem, 0);
|
LWIP_ASSERT("Failed to set up mutex", err == ERR_OK);
|
||||||
|
err = sys_sem_new(&instance->sem, 0);
|
||||||
|
LWIP_ASSERT("Failed to set up semaphore", err == ERR_OK);
|
||||||
instance->sync_fn = sync_fn;
|
instance->sync_fn = sync_fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user