Merge pull request #8439 from smlng/net/gnrc/netreg/fix_assert

gnrc/netreg: fix assert
This commit is contained in:
Sebastian Meiling 2018-01-29 16:46:19 +01:00 committed by GitHub
commit 0abbd9db8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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