| 203 | } |
| 204 | |
| 205 | static void finish_line(char *buf, size_t bufsz, size_t pos) { |
| 206 | if (bufsz == 0) { |
| 207 | return; |
| 208 | } |
| 209 | if (pos >= bufsz) { |
| 210 | buf[bufsz - 1] = '\0'; |
| 211 | } else { |
| 212 | buf[pos] = '\0'; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | static void emit_line(const char *line) { |
| 217 | /* Load ONCE: re-reading the global between the test and the call would |
no outgoing calls
no test coverage detected