Return -1, 0, 1 if refname is before, inside, or after the prefix. */
| 320 | |
| 321 | /* Return -1, 0, 1 if refname is before, inside, or after the prefix. */ |
| 322 | static int compare_prefix(const char *refname, const char *prefix) |
| 323 | { |
| 324 | while (*prefix) { |
| 325 | if (*refname != *prefix) |
| 326 | return ((unsigned char)*refname < (unsigned char)*prefix) ? -1 : +1; |
| 327 | |
| 328 | refname++; |
| 329 | prefix++; |
| 330 | } |
| 331 | |
| 332 | return 0; |
| 333 | } |
| 334 | |
| 335 | static int prefix_ref_iterator_advance(struct ref_iterator *ref_iterator) |
| 336 | { |
no outgoing calls
no test coverage detected