diff --git a/pkg/nimble/autoadv/nimble_autoadv.c b/pkg/nimble/autoadv/nimble_autoadv.c index 32c1b14cd8..590f3fe778 100644 --- a/pkg/nimble/autoadv/nimble_autoadv.c +++ b/pkg/nimble/autoadv/nimble_autoadv.c @@ -192,11 +192,11 @@ void nimble_autoadv_start(ble_addr_t *addr) if (addr != NULL) { mode = BLE_GAP_CONN_MODE_DIR; } - else if (_cfg.flags && NIMBLE_AUTOADV_FLAG_CONNECTABLE) { + else if (_cfg.flags & NIMBLE_AUTOADV_FLAG_CONNECTABLE) { mode = BLE_GAP_CONN_MODE_UND; } - uint8_t disc = (_cfg.flags && NIMBLE_AUTOADV_FLAG_SCANNABLE) ? BLE_GAP_CONN_MODE_DIR - : BLE_GAP_CONN_MODE_UND; + uint8_t disc = (_cfg.flags & NIMBLE_AUTOADV_FLAG_SCANNABLE) ? BLE_GAP_CONN_MODE_DIR + : BLE_GAP_CONN_MODE_UND; struct ble_gap_adv_params advp = { .conn_mode = mode, .disc_mode = disc, diff --git a/sys/net/crosslayer/inet_csum/inet_csum.c b/sys/net/crosslayer/inet_csum/inet_csum.c index abeda848a8..bc07ab5468 100644 --- a/sys/net/crosslayer/inet_csum/inet_csum.c +++ b/sys/net/crosslayer/inet_csum/inet_csum.c @@ -14,6 +14,8 @@ #include #include + +#include "modules.h" #include "od.h" #include "net/inet_csum.h" diff --git a/sys/net/gnrc/netreg/gnrc_netreg.c b/sys/net/gnrc/netreg/gnrc_netreg.c index bf26713ac1..e56f0dda13 100644 --- a/sys/net/gnrc/netreg/gnrc_netreg.c +++ b/sys/net/gnrc/netreg/gnrc_netreg.c @@ -152,6 +152,13 @@ int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry) } _gnrc_netreg_acquire_exclusive(); + + /* don't add the same entry twice */ + gnrc_netreg_entry_t *e; + LL_FOREACH(netreg[type], e) { + assert(entry != e); + } + LL_PREPEND(netreg[type], entry); _gnrc_netreg_release_exclusive(); diff --git a/sys/vfs/vfs.c b/sys/vfs/vfs.c index 29881fc942..c4eb4dbb0c 100644 --- a/sys/vfs/vfs.c +++ b/sys/vfs/vfs.c @@ -23,6 +23,8 @@ #include /* for O_ACCMODE, ..., fcntl */ #include /* for STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO */ +#include "container.h" +#include "modules.h" #include "vfs.h" #include "mutex.h" #include "thread.h"