int ret = 0;
/* address-list = (address *("," address)) / obs-addr-list */
- while (max_addresses-- > 0) {
+ while (max_addresses > 0) {
+ max_addresses--;
if ((ret = parse_address(ctx)) == 0)
break;
if (*ctx->parser.data != ',') {
if (ctx->chars_left-- == 0)
return FALSE;
}
- if (ctx->chars_left-- == 0)
+ if (ctx->chars_left == 0)
return FALSE;
+ ctx->chars_left--;
count = uni_utf8_char_bytes(data[i]);
i_assert(i + count <= size);
str_append_n(ctx->snippet, data + i, count);
if(len < old_tail) { /* have no complete word or haven't started
* the word yet */
/* endian-independent code follows: */
- while (len-- > 0)
+ while (len > 0) {
+ len--;
ctx->saved |= (uint64_t) (*(buf++)) <<
((ctx->byteIndex++) * 8);
+ }
i_assert(ctx->byteIndex < 8);
return;
}
if(old_tail != 0) { /* will have one word to process */
/* endian-independent code follows: */
len -= old_tail;
- while (old_tail-- > 0)
+ while (old_tail > 0) {
+ old_tail--;
ctx->saved |= (uint64_t) (*(buf++)) <<
((ctx->byteIndex++) * 8);
+ }
/* now ready to add saved to the sponge */
ctx->s[ctx->wordIndex] ^= ctx->saved;
/* finally, save the partial word */
i_assert(ctx->byteIndex == 0 && tail < 8);
- while (tail-- > 0) {
+ while (tail > 0) {
+ tail--;
ctx->saved |= (uint64_t) (*(buf++)) << ((ctx->byteIndex++) * 8);
}
i_assert(ctx->byteIndex < 8);