Merge pull request #8439 from smlng/net/gnrc/netreg/fix_assert
gnrc/netreg: fix assert
This commit is contained in:
commit
0abbd9db8f
@ -39,11 +39,9 @@ void gnrc_netreg_init(void)
|
|||||||
int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
|
int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
|
||||||
{
|
{
|
||||||
#if defined(MODULE_GNRC_NETAPI_MBOX) || defined(MODULE_GNRC_NETAPI_CALLBACKS)
|
#if defined(MODULE_GNRC_NETAPI_MBOX) || defined(MODULE_GNRC_NETAPI_CALLBACKS)
|
||||||
#ifdef DEVELHELP
|
|
||||||
/* only threads with a message queue are allowed to register at gnrc */
|
/* only threads with a message queue are allowed to register at gnrc */
|
||||||
assert((entry->type != GNRC_NETREG_TYPE_DEFAULT) ||
|
assert((entry->type != GNRC_NETREG_TYPE_DEFAULT) ||
|
||||||
sched_threads[entry->target.pid]->msg_array);
|
sched_threads[entry->target.pid]->msg_array);
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
/* only threads with a message queue are allowed to register at gnrc */
|
/* only threads with a message queue are allowed to register at gnrc */
|
||||||
assert(sched_threads[entry->target.pid]->msg_array);
|
assert(sched_threads[entry->target.pid]->msg_array);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user