mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
Merge pull request #12281 from aabadie/pr/ci/coccinelle_fix_remaining
tools/ci: fix remaining errors reported by coccinelle static check
This commit is contained in:
commit
3a4d1f9bb1
@ -183,9 +183,7 @@ static bool _send_wa(gnrc_netif_t *netif)
|
||||
/* Send WA */
|
||||
if (_gnrc_lwmac_transmit(netif, pkt) < 0) {
|
||||
LOG_ERROR("ERROR: [LWMAC-rx] Send WA failed.");
|
||||
if (pkt != NULL) {
|
||||
gnrc_pktbuf_release(pkt);
|
||||
}
|
||||
gnrc_pktbuf_release(pkt);
|
||||
gnrc_lwmac_set_quit_rx(netif, true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -217,9 +217,7 @@ static uint8_t _send_wr(gnrc_netif_t *netif)
|
||||
int res = _gnrc_lwmac_transmit(netif, pkt);
|
||||
if (res < 0) {
|
||||
LOG_ERROR("ERROR: [LWMAC-tx] Send WR failed.");
|
||||
if (pkt != NULL) {
|
||||
gnrc_pktbuf_release(pkt);
|
||||
}
|
||||
gnrc_pktbuf_release(pkt);
|
||||
tx_info |= GNRC_LWMAC_TX_FAIL;
|
||||
return tx_info;
|
||||
}
|
||||
|
||||
@ -35,9 +35,6 @@
|
||||
|
||||
#include "nimble_l2cap_test_conf.h"
|
||||
|
||||
#define ENABLE_DEBUG (1)
|
||||
#include "debug.h"
|
||||
|
||||
#define FLAG_UP (1u << 0)
|
||||
#define FLAG_SYNC (1u << 1)
|
||||
#define FLAG_TX_UNSTALLED (1u << 2)
|
||||
@ -224,10 +221,10 @@ static int _cmd_inctest(int argc, char **argv)
|
||||
|
||||
/* parse params */
|
||||
if (argc >= 2) {
|
||||
step = (size_t)atoi(argv[1]);
|
||||
step = atoi(argv[1]);
|
||||
}
|
||||
if (argc >= 3) {
|
||||
limit = (size_t)atoi(argv[2]);
|
||||
limit = atoi(argv[2]);
|
||||
if ((limit < 8) || (limit > APP_MTU)) {
|
||||
puts("err: invalid limit payload length given");
|
||||
return 1;
|
||||
@ -268,14 +265,14 @@ static int _cmd_floodtest(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (argc >= 2) {
|
||||
pktsize = (size_t)atoi(argv[1]);
|
||||
pktsize = atoi(argv[1]);
|
||||
if ((pktsize < 8) || (pktsize > APP_MTU)) {
|
||||
puts("err: invalid packet size given");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (argc >= 3) {
|
||||
limit = (unsigned)atoi(argv[2]);
|
||||
limit = atoi(argv[2]);
|
||||
}
|
||||
|
||||
/* now lets flood */
|
||||
|
||||
@ -46,7 +46,7 @@ static uint32_t initiated;
|
||||
|
||||
static unsigned _get_dev(const char *dev_str)
|
||||
{
|
||||
unsigned dev = (unsigned)atoi(dev_str);
|
||||
unsigned dev = atoi(dev_str);
|
||||
if (dev >= PWM_NUMOF) {
|
||||
printf("Error: device PWM_DEV(%u) is unknown\n", dev);
|
||||
return UINT_MAX;
|
||||
@ -123,7 +123,7 @@ static int _set(int argc, char**argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t chan = (uint8_t)atoi(argv[2]);
|
||||
uint8_t chan = atoi(argv[2]);
|
||||
if (chan >= pwm_channels(PWM_DEV(dev))) {
|
||||
printf("Error: channel %d is unknown.\n", chan);
|
||||
return 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user