| 1092 | } |
| 1093 | |
| 1094 | static int reftable_index_record_decode(void *rec, struct reftable_buf key, |
| 1095 | uint8_t val_type REFTABLE_UNUSED, |
| 1096 | struct string_view in, |
| 1097 | uint32_t hash_size REFTABLE_UNUSED, |
| 1098 | struct reftable_buf *scratch REFTABLE_UNUSED) |
| 1099 | { |
| 1100 | struct string_view start = in; |
| 1101 | struct reftable_index_record *r = rec; |
| 1102 | int err, n = 0; |
| 1103 | |
| 1104 | reftable_buf_reset(&r->last_key); |
| 1105 | err = reftable_buf_add(&r->last_key, key.buf, key.len); |
| 1106 | if (err < 0) |
| 1107 | return err; |
| 1108 | |
| 1109 | n = get_var_int(&r->offset, &in); |
| 1110 | if (n < 0) |
| 1111 | return n; |
| 1112 | |
| 1113 | string_view_consume(&in, n); |
| 1114 | return start.len - in.len; |
| 1115 | } |
| 1116 | |
| 1117 | static int reftable_index_record_equal(const void *a, const void *b, |
| 1118 | uint32_t hash_size REFTABLE_UNUSED) |
nothing calls this directly
no test coverage detected