mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-14 14:07:54 +00:00
porting: Assert when setting data for queued event
Setting data when event is already queued always indicates bug in code.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "os/os.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -146,6 +147,7 @@ ble_npl_event_get_arg(struct ble_npl_event *ev)
|
||||
static inline void
|
||||
ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg)
|
||||
{
|
||||
assert(ev->ev.ev_queued == 0);
|
||||
ev->ev.ev_arg = arg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user