From 12cfa6444cd239dbc04391027ad3161f53b6901c Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 20 Oct 2021 00:05:11 +0200 Subject: 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 --- pasta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pasta.c') diff --git a/pasta.c b/pasta.c index 395f459..3febfd5 100644 --- a/pasta.c +++ b/pasta.c @@ -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); -- cgit v1.2.3