summaryrefslogtreecommitdiff
path: root/src/ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.c')
-rw-r--r--src/ring.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ring.c b/src/ring.c
index ce125346..280b5f44 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -28,8 +28,9 @@
static void
vte_ring_validate(VteRing *ring)
{
- long i;
- for (i = ring->delta; i < ring->delta + ring->length; i++) {
+ long i, max;
+ max = ring->delta + ring->length;
+ for (i = ring->delta; i < max; i++) {
g_assert(vte_ring_contains(ring, i));
g_assert(ring->array[i % ring->max] != NULL);
}