This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] stdlib/tst-setcontext.c: Check for clobbering of signal stack.
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Cc: Will Newton <will dot newton at linaro dot org>
- Date: Sun, 03 Aug 2014 08:57:06 -0400
- Subject: Re: [PATCH 1/2] stdlib/tst-setcontext.c: Check for clobbering of signal stack.
- Authentication-results: sourceware.org; auth=none
- References: <1393829881-22691-1-git-send-email-will dot newton at linaro dot org>
On Mon 03 Mar 2014 14:58:00 Will Newton wrote:
> + sigaltstack(NULL, &stack_after);
incorrect style (and below). fixed with below as obvious.
-mike
>From a1d8c6215d0bcda6985cb383d8c440b03db7253d Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sun, 3 Aug 2014 08:55:20 -0400
Subject: [PATCH] tst-setcontext: fix style
---
stdlib/tst-setcontext.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/stdlib/tst-setcontext.c b/stdlib/tst-setcontext.c
index 55984a4..74d5133 100644
--- a/stdlib/tst-setcontext.c
+++ b/stdlib/tst-setcontext.c
@@ -74,8 +74,8 @@ f2 (void)
}
void
-test_stack(volatile int a, volatile int b,
- volatile int c, volatile int d)
+test_stack (volatile int a, volatile int b,
+ volatile int c, volatile int d)
{
volatile int e = 5;
volatile int f = 6;
@@ -83,7 +83,7 @@ test_stack(volatile int a, volatile int b,
/* Test for cases where getcontext is clobbering the callers
stack, including parameters. */
- getcontext(&uc);
+ getcontext (&uc);
if (a != 1)
{
@@ -147,7 +147,7 @@ main (void)
char st1[32768];
stack_t stack_before, stack_after;
- sigaltstack(NULL, &stack_before);
+ sigaltstack (NULL, &stack_before);
puts ("making contexts");
if (getcontext (&ctx[1]) != 0)
@@ -211,7 +211,7 @@ main (void)
puts ("back at main program");
back_in_main = 1;
- sigaltstack(NULL, &stack_after);
+ sigaltstack (NULL, &stack_after);
if (was_in_f1 == 0)
{
--
2.0.0