MCPcopy Create free account
hub / github.com/SIPp/sipp / setSubString

Method setSubString

src/actions.cpp:500–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500void CAction::setSubString(char** P_target, const char* P_source, int P_start, int P_stop)
501{
502 int sizeOf;
503
504 if (P_source != nullptr) {
505 sizeOf = P_stop - P_start;
506 (*P_target) = new char[sizeOf + 1];
507
508 if (sizeOf > 0) {
509 memcpy((*P_target), &(P_source[P_start]), sizeOf);
510 }
511
512 (*P_target)[sizeOf] = '\0';
513 } else {
514 *P_target = nullptr ;
515 }
516}
517
518
519#ifdef PCAPPLAY

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected