| 357 | } |
| 358 | |
| 359 | static FILE *message_stream_bytes(const void *bytes, size_t length) { |
| 360 | FILE *f = tmpfile(); |
| 361 | if (!f) { |
| 362 | return NULL; |
| 363 | } |
| 364 | (void)fwrite(bytes, 1, length, f); |
| 365 | rewind(f); |
| 366 | return f; |
| 367 | } |
| 368 | |
| 369 | static FILE *message_stream(const char *bytes) { |
| 370 | return message_stream_bytes(bytes, strlen(bytes)); |
no test coverage detected