From 295eade2a6cc0a4356a7b915135725b7d4d07ad7 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sun, 4 Jan 2015 15:31:47 +0000 Subject: [PATCH] Don't use ssize_t in bitfield.c (cleaner w/o it anyway) --- libtransmission/bitfield.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtransmission/bitfield.c b/libtransmission/bitfield.c index bed09aec5..5e96d4a38 100644 --- a/libtransmission/bitfield.c +++ b/libtransmission/bitfield.c @@ -45,10 +45,10 @@ static size_t countArray (const tr_bitfield * b) { size_t ret = 0; - ssize_t i = b->alloc_count; + size_t i = b->alloc_count; - while (--i >= 0) - ret += trueBitCount[b->bits[i]]; + while (i > 0) + ret += trueBitCount[b->bits[--i]]; return ret; } -- 2.40.0