From ab1f8af8d0ac1ff8466d8758dc11d06dbfe8df25 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 19 Feb 2023 17:57:48 -0300 Subject: Fix inconsistent leading spaces Changes: * Fix spaces being used for indentation in some lines in C * Remove leading spaces before some goto labels * Remove leading spaces before the start of some multiline comments * Change leading spaces to tabs in some multiline macros * Add missing asterisk to some multiline comments (to match other multiline comments and because they are false positives in the commands below) Note: Leading spaces can be used for alignment (such as in function parameters and function arguments in C) and for line continuation (such as in long commands in shell scripts). However, in the above changes the leading spaces are used for other reasons and do not seem to fit with the style used. Commands used to search for errors: $ git grep -In '^ [^*]' | grep -E -v \ -e '(COPYING|README|RELNOTES|configure(.ac)?):' \ -e '^[^:]+.(md|yml|py):' -e '(bash|zsh)_completion/' \ -e '^contrib/syntax/' -e '^etc/templates/.*\.txt:' -e '^m4/' \ -e '^platform/debian/' -e '^src/man/.*\.txt:' \ -e '.*mkrpm.sh:' -e '.*extract_errnos.sh:' --- src/fnet/fnet.h | 2 +- src/fnet/interface.c | 2 +- src/fnet/main.c | 10 +++++----- src/fnet/veth.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/fnet') diff --git a/src/fnet/fnet.h b/src/fnet/fnet.h index c9d40ec1d..f9b09d7ea 100644 --- a/src/fnet/fnet.h +++ b/src/fnet/fnet.h @@ -1,4 +1,4 @@ - /* +/* * Copyright (C) 2014-2023 Firejail Authors * * This file is part of firejail project diff --git a/src/fnet/interface.c b/src/fnet/interface.c index 873252d40..ca7c744ed 100644 --- a/src/fnet/interface.c +++ b/src/fnet/interface.c @@ -1,4 +1,4 @@ - /* +/* * Copyright (C) 2014-2023 Firejail Authors * * This file is part of firejail project diff --git a/src/fnet/main.c b/src/fnet/main.c index 1c48622a0..96c4f1478 100644 --- a/src/fnet/main.c +++ b/src/fnet/main.c @@ -1,4 +1,4 @@ - /* +/* * Copyright (C) 2014-2023 Firejail Authors * * This file is part of firejail project @@ -47,7 +47,7 @@ static void usage(void) { printf("\tfnet config mac addr\n"); printf("\tfnet config ipv6 dev ip\n"); printf("\tfnet ifup dev\n"); - printf("\tfnet waitll dev\n"); + printf("\tfnet waitll dev\n"); } int main(int argc, char **argv) { @@ -144,9 +144,9 @@ printf("\n"); else if (argc == 5 && strcmp(argv[1], "config") == 0 && strcmp(argv[2], "ipv6") == 0) { net_if_ip6(argv[3], argv[4]); } - else if (argc == 3 && strcmp(argv[1], "waitll") == 0) { - net_if_waitll(argv[2]); - } + else if (argc == 3 && strcmp(argv[1], "waitll") == 0) { + net_if_waitll(argv[2]); + } else { fprintf(stderr, "Error fnet: invalid arguments\n"); return 1; diff --git a/src/fnet/veth.c b/src/fnet/veth.c index 2a23c6bd4..2111cfa56 100644 --- a/src/fnet/veth.c +++ b/src/fnet/veth.c @@ -24,8 +24,8 @@ * * Authors: Alexey Kuznetsov, * - */ - /* +*/ +/* * Copyright (C) 2014-2023 Firejail Authors * * This file is part of firejail project -- cgit v1.2.3-54-g00ecf