diff options
author | David Robillard <d@drobilla.net> | 2022-06-28 18:48:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-28 19:02:49 -0400 |
commit | 71c4a3a6d66e96661fd341e1a089c4d8bd63fb13 (patch) | |
tree | 615c31e8399736519119ca8b37bc3c97ec2c1242 /test/ring_test.c | |
parent | 5d62313812b2fee9a4986e6b7ca1af40fb4f2fb6 (diff) | |
download | zix-71c4a3a6d66e96661fd341e1a089c4d8bd63fb13.tar.gz zix-71c4a3a6d66e96661fd341e1a089c4d8bd63fb13.tar.bz2 zix-71c4a3a6d66e96661fd341e1a089c4d8bd63fb13.zip |
Use uppercase integer literal suffixes
I give in.
Diffstat (limited to 'test/ring_test.c')
-rw-r--r-- | test/ring_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ring_test.c b/test/ring_test.c index af54e0e..79aa0f1 100644 --- a/test/ring_test.c +++ b/test/ring_test.c @@ -16,7 +16,7 @@ #include <stdio.h> #include <stdlib.h> -#define MSG_SIZE 20u +#define MSG_SIZE 20U static ZixRing* ring = 0; static unsigned n_writes = 0; @@ -25,7 +25,7 @@ static bool read_error = false; static int gen_msg(int* const msg, int start) { - for (unsigned i = 0u; i < MSG_SIZE; ++i) { + for (unsigned i = 0U; i < MSG_SIZE; ++i) { msg[i] = start; start = (start + 1) % INT_MAX; } @@ -36,7 +36,7 @@ ZIX_PURE_FUNC static int cmp_msg(const int* const msg1, const int* const msg2) { - for (unsigned i = 0u; i < MSG_SIZE; ++i) { + for (unsigned i = 0U; i < MSG_SIZE; ++i) { assert(msg1[i] == msg2[i]); } @@ -103,10 +103,10 @@ test_ring(const unsigned size) zix_ring_mlock(ring); ZixThread reader_thread; // NOLINT - assert(!zix_thread_create(&reader_thread, MSG_SIZE * 4ul, reader, NULL)); + assert(!zix_thread_create(&reader_thread, MSG_SIZE * 4UL, reader, NULL)); ZixThread writer_thread; // NOLINT - assert(!zix_thread_create(&writer_thread, MSG_SIZE * 4ul, writer, NULL)); + assert(!zix_thread_create(&writer_thread, MSG_SIZE * 4UL, writer, NULL)); zix_thread_join(reader_thread, NULL); zix_thread_join(writer_thread, NULL); @@ -168,7 +168,7 @@ test_failed_alloc(void) // Test that each allocation failing is handled gracefully const size_t n_new_allocs = allocator.n_allocations; - for (size_t i = 0u; i < n_new_allocs; ++i) { + for (size_t i = 0U; i < n_new_allocs; ++i) { allocator.n_remaining = i; assert(!zix_ring_new(&allocator.base, 512)); } |