Expand the specified proc-title-template string and return a newly * allocated sds, or NULL. */
| 6008 | /* Expand the specified proc-title-template string and return a newly |
| 6009 | * allocated sds, or NULL. */ |
| 6010 | static 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. */ |
| 6017 | int validateProcTitleTemplate(const char *template) { |
| 6018 | int ok = 1; |
no test coverage detected