diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
| commit | cfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch) | |
| tree | 8016486f8ee7157213f2d09ff2491bfa9c94638a /tests/alloca.c | |
| parent | 14e4d584d0121031ec40e6c35869745f1747ff29 (diff) | |
| parent | 1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff) | |
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
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 (); |
