MCPcopy Create free account
hub / github.com/coreboot/coreboot / xstrndup

Function xstrndup

util/kconfig/util.c:119–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119char *xstrndup(const char *s, size_t n)
120{
121 char *p;
122
123 p = strndup(s, n);
124 if (p)
125 return p;
126 fprintf(stderr, "Out of memory.\n");
127 exit(1);
128}

Callers 1

eval_clauseFunction · 0.85

Calls 3

strndupFunction · 0.85
fprintfFunction · 0.85
exitFunction · 0.85

Tested by

no test coverage detected