| 1759 | } |
| 1760 | |
| 1761 | static int discard_writer_output(write_db_ctx_t *w, int rc) { |
| 1762 | if (w->fp) { |
| 1763 | (void)fclose(w->fp); |
| 1764 | w->fp = NULL; |
| 1765 | } |
| 1766 | if (w->temp_path[0]) { |
| 1767 | (void)cbm_unlink(w->temp_path); |
| 1768 | } |
| 1769 | return rc; |
| 1770 | } |
| 1771 | |
| 1772 | static int publish_writer_output(write_db_ctx_t *w) { |
| 1773 | if (sync_writer_output(w->fp) != 0) { |
no test coverage detected