mirror of
https://passt.top/passt
synced 2025-08-01 21:57:59 +02:00
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>
This commit is contained in:
parent
7f1e7019cb
commit
12cfa6444c
14 changed files with 172 additions and 73 deletions
4
icmp.c
4
icmp.c
|
@ -254,11 +254,11 @@ void icmp_timer(struct ctx *c, struct timespec *ts)
|
|||
|
||||
v6:
|
||||
word = (long *)icmp_act[v6 ? V6 : V4];
|
||||
for (i = 0; i < sizeof(icmp_act[0]) / sizeof(long); i++, word++) {
|
||||
for (i = 0; i < ARRAY_SIZE(icmp_act); i += sizeof(long), word++) {
|
||||
tmp = *word;
|
||||
while ((n = ffsl(tmp))) {
|
||||
tmp &= ~(1UL << (n - 1));
|
||||
icmp_timer_one(c, v6, i * sizeof(long) * 8 + n - 1, ts);
|
||||
icmp_timer_one(c, v6, i * 8 + n - 1, ts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue