From abe56121c78a25c36d068075339849c29b5c2d8d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 4 Nov 2011 09:55:04 +0000 Subject: [PATCH] 2011-11-04 Sebastian Huber * support/src/test_support.c: Avoid magic numbers. --- testsuites/ChangeLog | 4 ++++ testsuites/support/src/test_support.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog index 7b52fad614..9d176e3908 100644 --- a/testsuites/ChangeLog +++ b/testsuites/ChangeLog @@ -1,3 +1,7 @@ +2011-11-04 Sebastian Huber + + * support/src/test_support.c: Avoid magic numbers. + 2011-10-25 Ralf Corsépius * support/include/tmacros.h: diff --git a/testsuites/support/src/test_support.c b/testsuites/support/src/test_support.c index aebaabe5ec..757f7b38c6 100644 --- a/testsuites/support/src/test_support.c +++ b/testsuites/support/src/test_support.c @@ -54,7 +54,7 @@ void Allocate_majority_of_workspace( int smallest ) do { result = rtems_workspace_allocate( - info.Free.largest-16, + info.Free.largest - HEAP_BLOCK_HEADER_SIZE, &temp ); if ((!result) || (!temp)) @@ -72,7 +72,7 @@ void Allocate_majority_of_heap( int smallest ) puts("Allocate_majority_of_heap: "); size = malloc_free_space(); do { - temp = malloc( size-16 ); + temp = malloc( size - HEAP_BLOCK_HEADER_SIZE ); if (!temp) perror("Unable to allocate from workspace"); size = malloc_free_space();