Validate the specified template, returns 1 if valid or 0 otherwise. */
| 7144 | } |
| 7145 | /* Validate the specified template, returns 1 if valid or 0 otherwise. */ |
| 7146 | int validateProcTitleTemplate(const char *_template) { |
| 7147 | int ok = 1; |
| 7148 | sds res = expandProcTitleTemplate(_template, ""); |
| 7149 | if (!res) |
| 7150 | return 0; |
| 7151 | if (sdslen(res) == 0) ok = 0; |
| 7152 | sdsfree(res); |
| 7153 | return ok; |
| 7154 | } |
| 7155 | |
| 7156 | int redisSetProcTitle(const char *title) { |
| 7157 | #ifdef USE_SETPROCTITLE |
no test coverage detected