@@ -78,10 +78,10 @@ static void test_bad_alloc(void)
78
78
* we don't know exactly how many allocations will be made (nor would we want
79
79
* to rely on such knowledge for testing, since it may change). Therefore, our
80
80
* custom allocator is configured to fail after 1, 2, 3, ... allocations, until
81
- * tph_poisson_create succeeds. This way all possible memory allocation failures
82
- * will be hit.
83
- *
84
- * Note that without this kind of exhaustive test it would be very difficult to
81
+ * tph_poisson_create succeeds. This way all possible memory allocation failures
82
+ * will be hit.
83
+ *
84
+ * Note that without this kind of exhaustive test it would be very difficult to
85
85
* achieve full test code coverage. */
86
86
87
87
/* Configure arguments. */
@@ -146,7 +146,7 @@ static void destroyed_alloc_free(void *ptr, ptrdiff_t size, void *ctx)
146
146
free (ptr );
147
147
}
148
148
149
- static void test_destroyed_alloc (void )
149
+ static void test_destroyed_alloc (void )
150
150
{
151
151
/* Configure arguments. */
152
152
const tph_poisson_real bounds_min [2 ] = { (tph_poisson_real )- 10 , (tph_poisson_real )- 10 };
@@ -164,21 +164,21 @@ static void test_destroyed_alloc(void)
164
164
165
165
/* Set up a simple allocator that count number of allocations/deallocations. */
166
166
destroyed_alloc_ctx alloc_ctx = { .num_mallocs = 0 , .num_frees = 0 };
167
- tph_poisson_allocator * alloc = malloc (sizeof (tph_poisson_default_alloc ));
167
+ tph_poisson_allocator * alloc = malloc (sizeof (tph_poisson_default_alloc ));
168
168
alloc -> malloc = destroyed_alloc_malloc ;
169
169
alloc -> free = destroyed_alloc_free ;
170
170
alloc -> ctx = & alloc_ctx ;
171
171
172
172
REQUIRE (tph_poisson_create (& args , alloc , & sampling ) == TPH_POISSON_SUCCESS );
173
173
174
174
/* Destroy the allocator before deallocating the sampling memory. The sampling
175
- * should have stored the malloc/free function pointers and context internally,
176
- * so there should be no errors. Note that the allocator context is not destroyed,
177
- * only the allocator.
178
- *
179
- * This prevent the implementation from storing a pointer to the allocator
175
+ * should have stored the malloc/free function pointers and context internally,
176
+ * so there should be no errors. Note that the allocator context is not destroyed,
177
+ * only the allocator.
178
+ *
179
+ * This prevent the implementation from storing a pointer to the allocator
180
180
* internally. Instead the implementation should copy the malloc/free function
181
- * pointers (and context) so that it does not depend on the lifetime of the
181
+ * pointers (and context) so that it does not depend on the lifetime of the
182
182
* allocator instance. */
183
183
free (alloc );
184
184
REQUIRE (alloc_ctx .num_mallocs > 0 );
0 commit comments