b58enc: Make loop variables unsigned

zcount can only ever be positive as it starts from 0 and is incremented.
i can only be positive as it starts from zcount and is incremented. This
removes one of three sign compare warnings in this function.
This commit is contained in:
Jon Griffiths
2016-04-04 19:05:55 +12:00
parent ae5fe61864
commit e77d2999fe

View File

@@ -146,8 +146,8 @@ bool b58enc(char *b58, size_t *b58sz, const void *data, size_t binsz)
{
const uint8_t *bin = data;
int carry;
ssize_t i, j, high, zcount = 0;
size_t size;
ssize_t j, high;
size_t i, size, zcount = 0;
while (zcount < binsz && !bin[zcount])
++zcount;