| 233 | } |
| 234 | |
| 235 | int strbuf_cmp(const struct strbuf *a, const struct strbuf *b) |
| 236 | { |
| 237 | size_t len = a->len < b->len ? a->len: b->len; |
| 238 | int cmp = memcmp(a->buf, b->buf, len); |
| 239 | if (cmp) |
| 240 | return cmp; |
| 241 | return a->len < b->len ? -1: a->len != b->len; |
| 242 | } |
| 243 | |
| 244 | void strbuf_splice(struct strbuf *sb, size_t pos, size_t len, |
| 245 | const void *data, size_t dlen) |
no outgoing calls
no test coverage detected