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

Function validateProcTitleTemplate

app/redis-6.2.6/src/server.c:6017–6025  ·  view source on GitHub ↗

Validate the specified template, returns 1 if valid or 0 otherwise. */

Source from the content-addressed store, hash-verified

6015}
6016/* Validate the specified template, returns 1 if valid or 0 otherwise. */
6017int validateProcTitleTemplate(const char *template) {
6018 int ok = 1;
6019 sds res = expandProcTitleTemplate(template, "");
6020 if (!res)
6021 return 0;
6022 if (sdslen(res) == 0) ok = 0;
6023 sdsfree(res);
6024 return ok;
6025}
6026
6027int redisSetProcTitle(char *title) {
6028#ifdef USE_SETPROCTITLE

Callers 1

isValidProcTitleTemplateFunction · 0.85

Calls 3

expandProcTitleTemplateFunction · 0.85
sdslenFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected