diff options
author | David Robillard <d@drobilla.net> | 2022-08-19 15:14:24 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-19 15:14:24 -0400 |
commit | 1c440b76eeaf4968debe18973435832200a0a12f (patch) | |
tree | d722c92fa8c16016d67eedc8d683c24f837a8d61 /src/ring.c | |
parent | 171aa2a60a8deeaf7b7692a0ecb6de56df1607f8 (diff) | |
download | zix-1c440b76eeaf4968debe18973435832200a0a12f.tar.gz zix-1c440b76eeaf4968debe18973435832200a0a12f.tar.bz2 zix-1c440b76eeaf4968debe18973435832200a0a12f.zip |
Avoid mixing signed and unsigned integers
Diffstat (limited to 'src/ring.c')
-rw-r--r-- | src/ring.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -86,7 +86,7 @@ zix_ring_new(ZixAllocator* const allocator, const uint32_t size) ring->write_head = 0; ring->read_head = 0; ring->size = next_power_of_two(size); - ring->size_mask = ring->size - 1; + ring->size_mask = ring->size - 1U; if (!(ring->buf = (char*)zix_malloc(allocator, ring->size))) { zix_free(allocator, ring); @@ -162,7 +162,7 @@ zix_ring_write_space(const ZixRing* const ring) uint32_t zix_ring_capacity(const ZixRing* const ring) { - return ring->size - 1; + return ring->size - 1U; } static inline uint32_t |