MCPcopy Create free account
hub / github.com/F-Stack/f-stack / expandProcTitleTemplate

Function expandProcTitleTemplate

app/redis-6.2.6/src/server.c:6010–6015  ·  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

6008/* Expand the specified proc-title-template string and return a newly
6009 * allocated sds, or NULL. */
6010static sds expandProcTitleTemplate(const char *template, const char *title) {
6011 sds res = sdstemplate(template, redisProcTitleGetVariable, (void *) title);
6012 if (!res)
6013 return NULL;
6014 return sdstrim(res, " ");
6015}
6016/* Validate the specified template, returns 1 if valid or 0 otherwise. */
6017int validateProcTitleTemplate(const char *template) {
6018 int ok = 1;

Callers 2

redisSetProcTitleFunction · 0.85

Calls 2

sdstemplateFunction · 0.85
sdstrimFunction · 0.85

Tested by

no test coverage detected