Expand the specified proc-title-template string and return a newly * allocated sds, or NULL. */
| 7137 | /* Expand the specified proc-title-template string and return a newly |
| 7138 | * allocated sds, or NULL. */ |
| 7139 | static 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. */ |
| 7146 | int validateProcTitleTemplate(const char *_template) { |
| 7147 | int ok = 1; |
no test coverage detected