| 222 | } |
| 223 | |
| 224 | static void finish_line(char *buf, size_t bufsz, size_t pos) { |
| 225 | if (bufsz == 0) { |
| 226 | return; |
| 227 | } |
| 228 | if (pos >= bufsz) { |
| 229 | buf[bufsz - 1] = '\0'; |
| 230 | } else { |
| 231 | buf[pos] = '\0'; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | static void emit_line(const char *line) { |
| 236 | /* Load ONCE: re-reading the global between the test and the call would |
no outgoing calls
no test coverage detected