diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:33 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:33 +0100 |
| commit | 5f59a34ab747dde8ede7357f3431bf06bd6002fe (patch) | |
| tree | 056a4477fd870d454d5be5868cddab829a47f4d2 /tests/alloca.c | |
| parent | 27dae84ed92f1ef0300263091972338d12e78348 (diff) | |
New upstream version 1.4.2upstream/1.4.2upstream
Diffstat (limited to 'tests/alloca.c')
| -rw-r--r-- | tests/alloca.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/alloca.c b/tests/alloca.c index 5eb16a9f..aff0c3bb 100644 --- a/tests/alloca.c +++ b/tests/alloca.c @@ -61,11 +61,11 @@ static int stack_dir; /* 1 or -1 once known. */ static int find_stack_direction (int *addr, int depth) { - int dir, dummy = 0; + int dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; - dir = depth ? find_stack_direction (addr, depth - 1) : 0; + int dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } @@ -140,14 +140,11 @@ alloca (size_t size) /* Allocate combined header + user data storage. */ { - /* Address of header. */ - register header *new; - size_t combined_size = sizeof (header) + size; if (combined_size < sizeof (header)) memory_full (); - new = malloc (combined_size); + register header *new = malloc (combined_size); if (! new) memory_full (); |
