1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

pkg: nordic_softdevice_ble: fix cppcheck warnings

This commit is contained in:
Oleg Hahm 2017-03-06 22:34:42 +01:00
parent 5a48c27d96
commit 22fd9c12cc
2 changed files with 3 additions and 8 deletions

View File

@ -172,13 +172,12 @@ int ble_mac_send(uint8_t dest[8], void *data, size_t len)
od_hex_dump(data, len, OD_WIDTH_DEFAULT);
#endif
int i;
ble_ipsp_handle_t *handle;
int ret = -1;
if ((!dest) || _is_broadcast(dest)) {
DEBUG("broadcast\n");
for (i = 0; i < BLE_MAC_MAX_INTERFACE_NUM; i++) {
for (int i = 0; i < BLE_MAC_MAX_INTERFACE_NUM; i++) {
if (interfaces[i].handle.cid != 0 && interfaces[i].handle.conn_handle != 0) {
ret = _send_to_peer(&interfaces[i].handle, data, len);
DEBUG("ret=%i\n", ret);
@ -207,9 +206,7 @@ static uint32_t ble_mac_ipsp_evt_handler_irq(ble_ipsp_handle_t *p_handle, ble_ip
{
uint32_t retval = NRF_SUCCESS;
ble_mac_interface_t *p_instance = NULL;
p_instance = ble_mac_interface_lookup(p_handle);
ble_mac_interface_t *p_instance = ble_mac_interface_lookup(p_handle);
if (p_handle) {
DEBUG("ble-mac: IPSP event [handle:%d CID 0x%04X]\n", p_handle->conn_handle, p_handle->cid);

View File

@ -80,9 +80,7 @@ static void _ble_mac_callback(ble_mac_event_enum_t event, void* arg)
static void _handle_raw_sixlowpan(ble_mac_inbuf_t *inbuf)
{
gnrc_pktsnip_t *pkt = NULL;
pkt = gnrc_pktbuf_add(NULL, inbuf->payload,
gnrc_pktsnip_t *pkt = gnrc_pktbuf_add(NULL, inbuf->payload,
inbuf->len,
GNRC_NETTYPE_SIXLOWPAN);