MCPcopy Index your code
hub / github.com/git/git / xstrndup

Function xstrndup

wrapper.c:116–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116char *xstrndup(const char *str, size_t len)
117{
118 const char *p = memchr(str, '\0', len);
119 return xmemdupz(str, p ? p - str : len);
120}
121
122int xstrncmpz(const char *s, const char *t, size_t len)
123{

Callers 15

parse_reference_uriFunction · 0.85
parse_refspecFunction · 0.85
add_to_trieFunction · 0.85
strip_path_suffixFunction · 0.85
match_atom_bool_argFunction · 0.85
receive_needsFunction · 0.85
parse_linesFunction · 0.85
handshakeFunction · 0.85
transport_getFunction · 0.85
process_capabilitiesFunction · 0.85
get_dirnameFunction · 0.85
traverse_treesFunction · 0.85

Calls 1

xmemdupzFunction · 0.85

Tested by 1

parse_refspecFunction · 0.68