summaryrefslogtreecommitdiff
path: root/tests/alloca.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
commitff33e1d252f46bec1a33e28700da3282fc24047a (patch)
tree5c15bc695be820b393a8496c5807ecafbbdeb89b /tests/alloca.c
parentb2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff)
parent5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff)
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2' with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
Diffstat (limited to 'tests/alloca.c')
-rw-r--r--tests/alloca.c9
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 ();