passt: Add cppcheck target, test, and address resulting warnings
...mostly false positives, but a number of very relevant ones too, in tcp_get_sndbuf(), tcp_conn_from_tap(), and siphash PREAMBLE(). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
5
qrap.c
5
qrap.c
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
|
||||
struct arphdr ah;
|
||||
struct arpmsg am;
|
||||
} probe = {
|
||||
htonl(42),
|
||||
.vnet_len = htonl(42),
|
||||
{
|
||||
.h_dest = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
|
||||
.h_source = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
|
||||
@@ -198,11 +198,12 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!strcmp(argv[i], "-device") && i + 1 < argc) {
|
||||
char *p;
|
||||
long n;
|
||||
|
||||
has_dev = 1;
|
||||
|
||||
if ((p = strstr(argv[i + 1], dev->template))) {
|
||||
long n;
|
||||
|
||||
n = strtol(p + strlen(dev->template), NULL, 16);
|
||||
if (!errno)
|
||||
addr_map |= (1 << n);
|
||||
|
Reference in New Issue
Block a user