aboutgitcodebugslistschat
path: root/ndp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-20 00:05:11 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-20 08:34:22 +0200
commit12cfa6444cd239dbc04391027ad3161f53b6901c (patch)
tree3fa746cef0cf3f543ebbe2e0d1535a331a1f2bd0 /ndp.c
parent7f1e7019cbd47a13dde38782d4bc7430cecff8c4 (diff)
downloadpasst-12cfa6444cd239dbc04391027ad3161f53b6901c.tar
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.gz
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.bz2
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.lz
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.xz
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.tar.zst
passt-12cfa6444cd239dbc04391027ad3161f53b6901c.zip
passt: Add clang-tidy Makefile target and test, take care of warnings
Most are just about style and form, but a few were actually serious mistakes (NDP-related). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'ndp.c')
-rw-r--r--ndp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ndp.c b/ndp.c
index e18d4cc..10c091c 100644
--- a/ndp.c
+++ b/ndp.c
@@ -53,7 +53,7 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len)
char buf[BUFSIZ] = { 0 };
uint8_t proto, *p;
- if (len < sizeof(*ehr) + sizeof(*ip6h) + sizeof(ih))
+ if (len < sizeof(*ehr) + sizeof(*ip6h) + sizeof(*ih))
return 0;
ih = (struct icmp6hdr *)ipv6_l4hdr(ip6h, &proto);
@@ -72,7 +72,7 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len)
ihr = (struct icmp6hdr *)(ip6hr + 1);
if (ih->icmp6_type == NS) {
- if (len < sizeof(*ehr) + sizeof(*ip6h) + sizeof(ih) +
+ if (len < sizeof(*ehr) + sizeof(*ip6h) + sizeof(*ih) +
sizeof(struct in6_addr))
return -1;