MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / expandProcTitleTemplate

Function expandProcTitleTemplate

src/server.cpp:7139–7144  ·  view source on GitHub ↗

Expand the specified proc-title-template string and return a newly * allocated sds, or NULL. */

Source from the content-addressed store, hash-verified

7137/* Expand the specified proc-title-template string and return a newly
7138 * allocated sds, or NULL. */
7139static sds expandProcTitleTemplate(const char *_template, const char *title) {
7140 sds res = sdstemplate(_template, redisProcTitleGetVariable, (void *) title);
7141 if (!res)
7142 return NULL;
7143 return sdstrim(res, " ");
7144}
7145/* Validate the specified template, returns 1 if valid or 0 otherwise. */
7146int validateProcTitleTemplate(const char *_template) {
7147 int ok = 1;

Callers 2

redisSetProcTitleFunction · 0.85

Calls 2

sdstemplateFunction · 0.85
sdstrimFunction · 0.85

Tested by

no test coverage detected