MCPcopy Create free account
hub / github.com/antirez/ds4 / xstrndup

Function xstrndup

ds4_server.c:107–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 return false;
106 }
107 p += (size_t)n;
108 len -= (size_t)n;
109 }
110 close(fd);
111 return true;
112}
113
114static char *xstrndup(const char *s, size_t n) {
115 char *p = xmalloc(n + 1);

Callers 15

json_escape_nFunction · 0.70
dsml_attrFunction · 0.70
split_reasoning_contentFunction · 0.70
dsml_attr_is_string_trueFunction · 0.70
openai_tool_start_invokeFunction · 0.70
openai_tool_start_paramFunction · 0.70

Calls 1

xmallocFunction · 0.70

Tested by

no test coverage detected