Searched refs:BT_BLOCK_SIZE (Results 1 – 2 of 2) sorted by relevance
42 #define BT_BLOCK_SIZE 256 macro141 if ((ctx->piece_count % BT_BLOCK_SIZE) == 0) { in bt_store_piece_sha1()142 block = (unsigned char*)malloc(BT_HASH_SIZE * BT_BLOCK_SIZE); in bt_store_piece_sha1()148 block = (unsigned char*)(ctx->hash_blocks.array[ctx->piece_count / BT_BLOCK_SIZE]); in bt_store_piece_sha1()151 hash = &block[BT_HASH_SIZE * (ctx->piece_count % BT_BLOCK_SIZE)]; in bt_store_piece_sha1()361 size -= BT_BLOCK_SIZE, i++) in bt_bencode_pieces()364 (size < BT_BLOCK_SIZE ? size : BT_BLOCK_SIZE) * BT_HASH_SIZE); in bt_bencode_pieces()365 p += BT_BLOCK_SIZE * BT_HASH_SIZE; in bt_bencode_pieces()
42 #define BT_BLOCK_SIZE 256 macro43 #define BT_BLOCK_SIZE_IN_BYTES (BT_BLOCK_SIZE * BT_HASH_SIZE)142 if ((ctx->piece_count % BT_BLOCK_SIZE) == 0) { in bt_store_piece_sha1()149 block = (unsigned char*)(ctx->hash_blocks.array[ctx->piece_count / BT_BLOCK_SIZE]); in bt_store_piece_sha1()152 hash = &block[BT_HASH_SIZE * (ctx->piece_count % BT_BLOCK_SIZE)]; in bt_store_piece_sha1()