1
0
Fork 0
mirror of https://passt.top/passt synced 2025-08-19 04:43:13 +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:
Stefano Brivio 2021-10-20 00:05:11 +02:00
commit 12cfa6444c
14 changed files with 172 additions and 73 deletions

View file

@ -204,7 +204,7 @@ void pasta_start_ns(struct ctx *c)
close(fd);
fd = open("/proc/self/setgroups", O_WRONLY);
if (write(fd, "deny", sizeof("deny")))
if (write(fd, "deny", sizeof("deny")) < 0)
warn("Cannot write to setgroups in namespace");
close(fd);