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

Function strvec_replace

strvec.c:81–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81const char *strvec_replace(struct strvec *array, size_t idx, const char *replacement)
82{
83 char *to_free;
84 if (idx >= array->nr)
85 BUG("index outside of array boundary");
86 to_free = (char *) array->v[idx];
87 array->v[idx] = xstrdup(replacement);
88 free(to_free);
89 return array->v[idx];
90}
91
92void strvec_remove(struct strvec *array, size_t idx)
93{

Callers 9

alias_all_urlsFunction · 0.85
strip_extensionFunction · 0.85
handle_builtinFunction · 0.85
cmd_mainFunction · 0.85
sanitize_pathsFunction · 0.85

Calls 1

xstrdupFunction · 0.85