MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / pkg_strdup

Function pkg_strdup

ut.h:985–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

983}
984
985static inline char *pkg_strdup(const char *str)
986{
987 char *rval;
988 int len;
989
990 if (!str)
991 return NULL;
992
993 len = strlen(str) + 1;
994 rval = pkg_malloc(len);
995 if (!rval)
996 return NULL;
997 memcpy(rval, str, len);
998 return rval;
999}
1000
1001/* Extend the given buffer only if needed */
1002static inline int pkg_str_extend(str *in, int size)

Callers 8

tr_parse_tzFunction · 0.85
mongo_new_connectionFunction · 0.85
rtpe_function_call_asyncFunction · 0.85
force_rtpproxy_body_partFunction · 0.85
set_rule_tables_queryFunction · 0.85
test_updateFunction · 0.85
test_map_setFunction · 0.85
test_map_opsFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_updateFunction · 0.68
test_map_setFunction · 0.68
test_map_opsFunction · 0.68