diff options
author | 2023-02-19 17:57:48 -0300 | |
---|---|---|
committer | 2023-02-20 18:02:37 -0300 | |
commit | ab1f8af8d0ac1ff8466d8758dc11d06dbfe8df25 (patch) | |
tree | 7ff503cf1ad951be3c2dc88caea1f4e1d6c70699 /src/fnet/main.c | |
parent | *.sh: use consistent indentation (diff) | |
download | firejail-ab1f8af8d0ac1ff8466d8758dc11d06dbfe8df25.tar.gz firejail-ab1f8af8d0ac1ff8466d8758dc11d06dbfe8df25.tar.zst firejail-ab1f8af8d0ac1ff8466d8758dc11d06dbfe8df25.zip |
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:'
Diffstat (limited to 'src/fnet/main.c')
-rw-r--r-- | src/fnet/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2014-2023 Firejail Authors | 2 | * Copyright (C) 2014-2023 Firejail Authors |
3 | * | 3 | * |
4 | * This file is part of firejail project | 4 | * This file is part of firejail project |
@@ -47,7 +47,7 @@ static void usage(void) { | |||
47 | printf("\tfnet config mac addr\n"); | 47 | printf("\tfnet config mac addr\n"); |
48 | printf("\tfnet config ipv6 dev ip\n"); | 48 | printf("\tfnet config ipv6 dev ip\n"); |
49 | printf("\tfnet ifup dev\n"); | 49 | printf("\tfnet ifup dev\n"); |
50 | printf("\tfnet waitll dev\n"); | 50 | printf("\tfnet waitll dev\n"); |
51 | } | 51 | } |
52 | 52 | ||
53 | int main(int argc, char **argv) { | 53 | int main(int argc, char **argv) { |
@@ -144,9 +144,9 @@ printf("\n"); | |||
144 | else if (argc == 5 && strcmp(argv[1], "config") == 0 && strcmp(argv[2], "ipv6") == 0) { | 144 | else if (argc == 5 && strcmp(argv[1], "config") == 0 && strcmp(argv[2], "ipv6") == 0) { |
145 | net_if_ip6(argv[3], argv[4]); | 145 | net_if_ip6(argv[3], argv[4]); |
146 | } | 146 | } |
147 | else if (argc == 3 && strcmp(argv[1], "waitll") == 0) { | 147 | else if (argc == 3 && strcmp(argv[1], "waitll") == 0) { |
148 | net_if_waitll(argv[2]); | 148 | net_if_waitll(argv[2]); |
149 | } | 149 | } |
150 | else { | 150 | else { |
151 | fprintf(stderr, "Error fnet: invalid arguments\n"); | 151 | fprintf(stderr, "Error fnet: invalid arguments\n"); |
152 | return 1; | 152 | return 1; |