diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-05-07 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-05-07 08:00:00 +0000 |
commit | 60848f9ce7ce7b21d0aa7f92c6a3f001352d5952 (patch) | |
tree | 8db459920abd36dbf857de59b24df63374548189 /tests/signalfd4.c | |
parent | 908111b7d091ee0defddd619b2dc352d37656407 (diff) | |
download | strace-60848f9ce7ce7b21d0aa7f92c6a3f001352d5952.tar.gz |
Fix preprocessor indentation
Indent the C preprocessor directives to reflect their nesting
using the following script:
$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' src tests |grep -v '\.sh$') |while read f; do
cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done
Diffstat (limited to 'tests/signalfd4.c')
-rw-r--r-- | tests/signalfd4.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/signalfd4.c b/tests/signalfd4.c index 6b2aac530..a945dcf84 100644 --- a/tests/signalfd4.c +++ b/tests/signalfd4.c @@ -20,9 +20,9 @@ # include <sys/signalfd.h> # include "kernel_fcntl.h" -#ifndef SKIP_IF_PROC_IS_UNAVAILABLE -# define SKIP_IF_PROC_IS_UNAVAILABLE -#endif +# ifndef SKIP_IF_PROC_IS_UNAVAILABLE +# define SKIP_IF_PROC_IS_UNAVAILABLE +# endif int main(void) @@ -39,28 +39,28 @@ main(void) int fd = signalfd(-1, &mask, SFD_CLOEXEC | SFD_NONBLOCK); -#ifdef PRINT_SIGNALFD +# ifdef PRINT_SIGNALFD if (fd == -1) perror_msg_and_skip("signalfd"); -#endif +# endif printf("signalfd4(-1, [%s], %u, SFD_CLOEXEC|SFD_NONBLOCK) = %s", sigs1, size, sprintrc(fd)); -#ifdef PRINT_SIGNALFD +# ifdef PRINT_SIGNALFD printf("<signalfd:[%s]>\n", sigs1); -#else +# else putchar('\n'); -#endif +# endif sigaddset(&mask, SIGCHLD); fd = signalfd(fd, &mask, 0); -#ifdef PRINT_SIGNALFD +# ifdef PRINT_SIGNALFD printf("signalfd4(%d<signalfd:[%s]>, [%s], %u, 0) = %s<signalfd:[%s]>\n", fd, sigs1, sigs2, size, sprintrc(fd), sigs2); -#else +# else printf("signalfd4(%d, [%s], %u, 0) = %s\n", fd, sigs2, size, sprintrc(fd)); -#endif +# endif puts("+++ exited with 0 +++"); return 0; |