| 109 | } |
| 110 | |
| 111 | int reftable_buf_cmp(const struct reftable_buf *a, const struct reftable_buf *b) |
| 112 | { |
| 113 | size_t len = a->len < b->len ? a->len : b->len; |
| 114 | if (len) { |
| 115 | int cmp = memcmp(a->buf, b->buf, len); |
| 116 | if (cmp) |
| 117 | return cmp; |
| 118 | } |
| 119 | return a->len < b->len ? -1 : a->len != b->len; |
| 120 | } |
| 121 | |
| 122 | int reftable_buf_add(struct reftable_buf *buf, const void *data, size_t len) |
| 123 | { |
no outgoing calls