tr_ioFindFileLocation(tor, pieceIndex, pieceOffset, &fileIndex, &fileOffset);
- while (buflen && !err)
+ while (buflen != 0 && err == 0)
{
tr_file const* file = &info->files[fileIndex];
uint64_t const bytesThisPass = MIN(buflen, file->length - fileOffset);
tr_ioPrefetch(tor, pieceIndex, offset, bytesLeft);
- while (bytesLeft)
+ while (bytesLeft != 0)
{
size_t const len = MIN(bytesLeft, buflen);
success = tr_cacheReadBlock(tor->session->cache, tor, pieceIndex, offset, len, buffer) == 0;
tr_variantFree(&top);
}
- check(json);
+ check(json != NULL);
check(strstr(json, "\\u00f6") != NULL);
check(strstr(json, "\\u00e9") != NULL);
err = tr_variantFromJson(&top, json, strlen(json));