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 --- conf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 2fb58a7..13d3dc6 100644 --- a/conf.c +++ b/conf.c @@ -912,10 +912,6 @@ void conf(struct ctx *c, int argc, char **argv) c->foreground = 1; break; - case '?': - case 'h': - usage(argv[0]); - break; case 's': if (*c->sock_path) { err("Multiple --socket options given"); @@ -1142,6 +1138,11 @@ void conf(struct ctx *c, int argc, char **argv) usage(argv[0]); break; + case '?': + case 'h': + default: + usage(argv[0]); + break; } } while (name != -1); -- cgit v1.2.3