Skip to content

Commit 60f7f2d

Browse files
real-or-randomjonasnick
authored andcommitted
Don't assume that ALIGNMENT > 1 in tests
1 parent ada6361 commit 60f7f2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tests.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ void run_scratch_tests(void) {
366366
CHECK(scratch->alloc_size != 0);
367367
CHECK(scratch->alloc_size % ALIGNMENT == 0);
368368

369-
/* Allocating another 500 bytes fails */
370-
CHECK(secp256k1_scratch_alloc(&none->error_callback, scratch, 500) == NULL);
369+
/* Allocating another 501 bytes fails */
370+
CHECK(secp256k1_scratch_alloc(&none->error_callback, scratch, 501) == NULL);
371371
CHECK(secp256k1_scratch_max_allocation(&none->error_callback, scratch, 0) == 1000 - adj_alloc);
372372
CHECK(secp256k1_scratch_max_allocation(&none->error_callback, scratch, 1) == 1000 - adj_alloc - (ALIGNMENT - 1));
373373
CHECK(scratch->alloc_size != 0);

0 commit comments

Comments
 (0)