MCPcopy Create free account
hub / github.com/git/git / reftable_buf_cmp

Function reftable_buf_cmp

reftable/basics.c:111–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111int 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
122int reftable_buf_add(struct reftable_buf *buf, const void *data, size_t len)
123{

Calls

no outgoing calls