MCPcopy Create free account
hub / github.com/GJDuck/e9patch / strDup

Function strDup

src/e9tool/e9misc.cpp:51–58  ·  view source on GitHub ↗

* Duplicate a string. */

Source from the content-addressed store, hash-verified

49 * Duplicate a string.
50 */
51char *strDup(const char *old_str, size_t n)
52{
53 char *new_str = strndup(old_str, n);
54 if (new_str == nullptr)
55 error("failed to duplicate string \"%s\": %s", old_str,
56 strerror(ENOMEM));
57 return new_str;
58}
59
60/*
61 * Create a persistent copy of a string.

Callers 15

parseMatchArgFunction · 0.85
parseFunctionNameFunction · 0.85
parseSymbolNameFunction · 0.85
parsePatchArgFunction · 0.85
parsePatchFunction · 0.85
warningMethod · 0.85
parseELFMethod · 0.85
parsePEMethod · 0.85
e9frontend.cppFile · 0.85
parseEntryFunction · 0.85
openPluginFunction · 0.85
main_2Function · 0.85

Calls 2

errorFunction · 0.85
strerrorFunction · 0.85

Tested by

no test coverage detected