Skip to content
Snippets Groups Projects
Commit d9276b6f authored by Anjan Chanda's avatar Anjan Chanda
Browse files

gitlab-ci: fix cppcheck errors, warnings and false-positives

parent 40356c2c
Branches
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ static int bcm_eth_get_unit_port(const char *ifname, int *unit, int *port) ...@@ -76,7 +76,7 @@ static int bcm_eth_get_unit_port(const char *ifname, int *unit, int *port)
unsigned int portmap = data.port_map; unsigned int portmap = data.port_map;
for (i = 0; i < 8 * sizeof(portmap); i++) { for (i = 0; i < 8 * sizeof(portmap); i++) {
if (!!(portmap & (1 << i))) { if (!!(portmap & (1UL << i))) {
*port = i; *port = i;
break; break;
} }
...@@ -293,7 +293,7 @@ static int read_eth_stats(const char *ifname, struct eth_stats *s) ...@@ -293,7 +293,7 @@ static int read_eth_stats(const char *ifname, struct eth_stats *s)
memset(&data, 0, sizeof(struct ethswctl_data)); memset(&data, 0, sizeof(struct ethswctl_data));
ret = bcm_eth_get_unit_port(ifname, &unit, &port); ret = bcm_eth_get_unit_port(ifname, &unit, &port);
if (ret) if (ret)
return ret_proc == 0 ? 0 : -1; return -1;
data.op = ETHSWEMACGET; data.op = ETHSWEMACGET;
data.port = port; data.port = port;
...@@ -304,7 +304,7 @@ static int read_eth_stats(const char *ifname, struct eth_stats *s) ...@@ -304,7 +304,7 @@ static int read_eth_stats(const char *ifname, struct eth_stats *s)
sizeof(struct ethswctl_data)); sizeof(struct ethswctl_data));
if (ret != 0) { if (ret != 0) {
libethernet_err("ioctl failed! ret = %d\n", ret); libethernet_err("ioctl failed! ret = %d\n", ret);
return ret_proc == 0 ? 0 : -1; return -1;
} }
s->tx_bytes = data.emac_stats_s.tx_byte; s->tx_bytes = data.emac_stats_s.tx_byte;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment