Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision 49a980b02903e78c574238bd0898ebe7a3bd8281)
+++ libcfa/src/stdlib.hfa	(revision 68f0c4ed89417e86156a08a8eea91df3d03aa571)
@@ -43,24 +43,14 @@
 //---------------------------------------
 
-// Macro because of returns
-#define $VAR_ALLOC( allocation, alignment ) \
-	if ( _Alignof(T) <= libAlign() ) return (T *)(void *)allocation( (size_t)sizeof(T) ); /* C allocation */ \
-	else return (T *)alignment( _Alignof(T), sizeof(T) )
-
 #define $ARRAY_ALLOC( allocation, alignment, dim ) \
 	if ( _Alignof(T) <= libAlign() ) return (T *)(void *)allocation( dim, (size_t)sizeof(T) ); /* C allocation */ \
 	else return (T *)alignment( _Alignof(T), dim, sizeof(T) )
 
-#define $RE_SPECIALS( ptr, size, allocation, alignment ) \
-	if ( unlikely( size == 0 ) || unlikely( ptr == 0p ) ) { \
-		if ( unlikely( size == 0 ) ) free( ptr ); \
-		$VAR_ALLOC( malloc, memalign ); \
-	} /* if */
-
 static inline forall( dtype T | sized(T) ) {
 	// Cforall safe equivalents, i.e., implicit size specification
 
 	T * malloc( void ) {
-		$VAR_ALLOC( malloc, memalign );
+		if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( (size_t)sizeof(T) ); /* C allocation */
+		else return (T *)memalign( _Alignof(T), sizeof(T) );
 	} // malloc
 
@@ -74,5 +64,4 @@
 
 	T * resize( T * ptr, size_t size ) {				// CFA resize, eliminate return-type cast
-		$RE_SPECIALS( ptr, size, malloc, memalign );
 		if ( _Alignof(T) <= libAlign() ) return (T *)(void *)resize( (void *)ptr, size ); // CFA resize
 		else return (T *)(void *)resize( (void *)ptr, _Alignof(T), size ); // CFA resize
@@ -80,5 +69,4 @@
 
 	T * realloc( T * ptr, size_t size ) {				// CFA realloc, eliminate return-type cast
-		$RE_SPECIALS( ptr, size, malloc, memalign );
 		if ( _Alignof(T) <= libAlign() ) return (T *)(void *)realloc( (void *)ptr, size ); // C realloc
 		else return (T *)(void *)realloc( (void *)ptr, _Alignof(T), size ); // CFA realloc
@@ -188,11 +176,13 @@
 		size_t size = sizeof(T);
 		size_t copy_end = 0;
-
 		if(Resize) {
-			ptr = (T*) (void *) resize( (int *)Resize, Align, Dim * size );
+//printf("1. $alloc_internal got: %p %p %lu %lu\n", Resize, Realloc, Align, Dim); // these prints are temporary
+			ptr = (T*) (void *) resize( (void *)Resize, Align, Dim * size );
 		} else if (Realloc) {
 			if (Fill.tag != '0') copy_end = min(malloc_size( Realloc ), Dim * size);
-			ptr = (T*) (void *) realloc( (int *)Realloc, Align, Dim * size );
+//printf("2. $alloc_internal got: %p %p %lu %lu\n", Resize, Realloc, Align, Dim);
+			ptr = (T*) (void *) realloc( (void *)Realloc, Align, Dim * size );
 		} else {
+//printf("3. $alloc_internal got: %p %p %lu %lu\n", Resize, Realloc, Align, Dim);
 			ptr = (T*) (void *) memalign( Align, Dim * size );
 		}
