From 490051f71494e828f2020257c012c3b28398d852 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 19 Feb 2023 14:26:15 -0300 Subject: Fix space before/after tab in indent This fixes all of the "space before tab in indent" errors raised by git: $ git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904..HEAD | grep '^[^+]' | cut -f 3 -d : | LC_ALL=C sort | uniq -c 72 space before tab in indent. Commands used to find the errors: $ git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904..HEAD $ git grep -In "$(printf '\t') " Note: Unlike "space before tab in indent", the reverse ("space after tab in indent") is not reported by git. That is because spaces could be intentionally used for alignment or line continuation, but in some cases they are being used for indentation together with tabs and in others the formatting is misaligned. The second command was used to help find and fix these other issues. --- src/profstats/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/profstats') diff --git a/src/profstats/main.c b/src/profstats/main.c index 90a5f405d..491cec736 100644 --- a/src/profstats/main.c +++ b/src/profstats/main.c @@ -166,7 +166,7 @@ static void process_file(char *fname) { else if (strncmp(ptr, "include whitelist-var-common.inc", 32) == 0) cnt_whitelistvar++; else if (strncmp(ptr, "include whitelist-runuser-common.inc", 36) == 0 || - strncmp(ptr, "blacklist ${RUNUSER}", 20) == 0) + strncmp(ptr, "blacklist ${RUNUSER}", 20) == 0) cnt_whitelistrunuser++; else if (strncmp(ptr, "include whitelist-common.inc", 28) == 0) cnt_whitelisthome++; @@ -283,10 +283,10 @@ int main(int argc, char **argv) { arg_dbus_user_none = 1; else if (*argv[i] == '-') { fprintf(stderr, "Error: invalid option %s\n", argv[i]); - return 1; - } - else - break; + return 1; + } + else + break; } start = i; -- cgit v1.2.3-54-g00ecf