| 212 | } |
| 213 | |
| 214 | static int read_block(struct reftable_block_source *source, |
| 215 | struct reftable_block_data *dest, uint64_t off, |
| 216 | uint32_t sz) |
| 217 | { |
| 218 | size_t size = block_source_size(source); |
| 219 | block_source_release_data(dest); |
| 220 | if (off >= size) |
| 221 | return 0; |
| 222 | if (off + sz > size) |
| 223 | sz = size - off; |
| 224 | return block_source_read_data(source, dest, off, sz); |
| 225 | } |
| 226 | |
| 227 | int reftable_block_init(struct reftable_block *block, |
| 228 | struct reftable_block_source *source, |
no test coverage detected