MCPcopy Create free account
hub / github.com/acl-dev/acl / tpl_set_field

Function tpl_set_field

app/wizard/tpllib.cpp:696–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694
695
696void tpl_set_field(tpl_t* tpl, const char* key, const char* val, int len)
697{
698 tpl_fcell_t *field = tpl_get_field(tpl->tpl, key);
699 if (field != NULL)
700 {
701 if (len > INITIAL_FIELD_LEN && len > field->len)
702 field->val = (char*) acl_myrealloc(field->val, len + 1);
703
704 field->len = len;
705 (void)memcpy(field->val, val, len);
706 field->val[len] = 0;
707 }
708}
709
710void tpl_set_field_fmt(tpl_t* tpl, const char* key, const char* fmt, ...)
711{

Callers 1

tpl_set_field_globalFunction · 0.70

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…