Append a single token to `tokens` if there's capacity. Consolidates the * `if (count < max_tokens) { tokens[count++] = strdup(...); }` pattern. */
| 125 | /* Append a single token to `tokens` if there's capacity. Consolidates the |
| 126 | * `if (count < max_tokens) { tokens[count++] = strdup(...); }` pattern. */ |
| 127 | static int push_pattern_token(char **tokens, int count, int max_tokens, const char *text) { |
| 128 | if (count >= max_tokens) { |
| 129 | return count; |
| 130 | } |
| 131 | tokens[count] = strdup(text); |
| 132 | return tokens[count] ? count + SKIP_ONE : count; |
| 133 | } |
| 134 | |
| 135 | /* True if `s` contains any of the space-separated substrings in `needles`. */ |
| 136 | static bool has_any(const char *s, const char *const *needles) { |
no outgoing calls
no test coverage detected