MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / stringVectorToPointerArray

Function stringVectorToPointerArray

src/execwrappers.cpp:538–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538static const char **
539stringVectorToPointerArray(const vector<string> &s, size_t len)
540{
541 JASSERT(len >= s.size());
542
543 const char **result = (const char **) JALLOC_MALLOC(len * sizeof (char*));
544 JASSERT(result != NULL);
545
546 // Now get the pointers.
547 for (size_t i = 0; i < s.size(); i++) {
548 result[i] = s[i].c_str();
549 }
550
551 result[s.size()] = NULL;
552
553 return result;
554}
555
556static const char *ourImportantEnvs[] =
557{

Callers 1

dmtcp_execvpeFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected